Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

CumulusMX - RaspberyPi - Start|Stop|Restart Script V2.5.5.0

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.
User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jpsc » Tue Dec 08, 2015 8:33 pm

jank wrote:As you can see, it is running without any problems, it is running not with sudo and I don't have to type sudo bash /mnt/usbdrive/CumulusMX/cumulusmx.sh
I am not sure what happened with your filesystem that the USB drive behaves so different fomr local SD Card.
This is looking great, I am not really bothered getting to the bottom of the USB stick issue, I won't be using it in a few weeks. If it happens with the SSD then I'll be more concerned with a long term solution.
jank wrote:Are you interested to know, how you can start your RaspberryPi from a minimal SDCard and your Root Filesystem is completely on a USB Drive/Stick ?
I am happy as it is, thanks. I'd like to keep the SD as stock as possible, so if I have a failure I can just slot in another.
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

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

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jank » Tue Dec 08, 2015 8:39 pm

But I assume that you will not use your SSD as an additional Drive only, but putting the operating System on it and boot from SSD?
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

User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jpsc » Wed Dec 09, 2015 8:13 am

I'll see how it goes. I don't know the capabilities of the Plusberry Pi. I think it just makes the drive available as a USB device. Simplest to keep the SD as primary boot and carry on as I am.
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

grunge
Posts: 2
Joined: Tue Dec 08, 2015 3:58 am
Weather Station: WeatherDuino Pro 2
Operating System: Linux Raspberry Pi
Location: Brisbane

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by grunge » Sat Dec 12, 2015 8:31 pm

Hi Steve,
Many thanks, decommissioned Weewx and CumulusMX went in very simple. I was trying to understand just how to configure it up as in port settings with some reservations only to find that "it just works". Now I need to start building my WeatherDuino Pro 2 (on it's way) to bring it all back to life.

Graham
Kenmore, QLD, Australia

grunge
Posts: 2
Joined: Tue Dec 08, 2015 3:58 am
Weather Station: WeatherDuino Pro 2
Operating System: Linux Raspberry Pi
Location: Brisbane

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by grunge » Sat Dec 12, 2015 8:36 pm

A callout to slashmusic, your scripting and examples were fantastic. It helped an old bugga like me to get it up and going with ease.
Thank you
Graham

Kenmore, QLD, Australia

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

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jank » Sun Dec 13, 2015 3:25 pm

grunge wrote:A callout to slashmusic, your scripting and examples were fantastic. It helped an old bugga like me to get it up and going with ease.
Thank you
Graham

Kenmore, QLD, Australia
Thank you for the kudo's, Graham.
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

User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jpsc » Tue Dec 15, 2015 12:44 am

Tried -u, it did not go exactly as planned

Code: Select all

This Option will update your CumulusMX Version based on a new CumulusMXDISTxxxx Zip File
Enter path and filename of the Cumulus Update file - use tab for completion: /mnt/thumb/CumulusMXDist3036.zip

I found this file: /mnt/thumb/CumulusMXDist3036.zip - Size: 6385341 Bytes

Do you want to stop CumulusMX and extract /mnt/thumb/CumulusMXDist3036.zip into /mnt/thumb/CMX/ ? [Y/n]y
Any folder in the Update Archive file which should not be extracted to /mnt/thumb/CMX/? Insert name of the folder (example: web ):

Folder <> in the zip  will not be extracted to /mnt/thumb/CMX/

Beginning with Update of Cumulus MX v.3.0.0 build 3035 - File: /mnt/thumb/CumulusMXDist3036.zip will be extracted to /mnt/thumb/CMX/
Press any key to continue... or CTRL+C to quit
CumulusMX is being stopped - extracting Update File now

Archive:  /tmp/cumulusmx_update.zip
warning [/tmp/cumulusmx_update.zip]:  zipfile is empty
Update successfully installed, do you want to start CumulusMX again ? [Y/n]
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

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

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jank » Tue Dec 15, 2015 9:33 am

jpsc wrote:Tried -u, it did not go exactly as planned
Yes, it was not a bug, it was an easteregg :-)
No, you are right, it was a failure in my script.
Explanation: I don't use Steve's original Webfiles, I am using my own Webfiles so when extracting everything from the ZIP, my "web" folder would be overwritten with the original ones. So I inserted an option to override the extraction of a directory in the CumulusMXDistxxxx.zip file.
1. I make a copy of the original CumulusMXDistxxxx.zip into /tmp and removing the "override" folder
cp CumulusMXDistxxxx.zip /tmp/cumulusmx_update.zip
zip -d -q cumulusmx_update.zip *$OVERRIDE/*


2. I unzip this new ZIP file to the Original CumulusMX installation folder
unzip /tmp/cumulusmx_update.zip -d /home/pi/CumulusMX/

This will work, until the variable $OVERRIDE is being filled with a foldername. in my example "web"
zip -d -q cumulusmx_update.zip *web/*

but when you don't want to exclude a folder, this command looks like this
zip -d -q cumulusmx_update.zip */*

And the ZIP command will remove everything in this ZIP file, so you get the error "Zip file is empty"

finally you get it working when excluding the web folder(for example) if asked to and it will update your Installation.
Meanwhile I fixed this error and the next version will check if $OVERRIDE is empty or not.

Thank you for testing it.
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

User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jpsc » Tue Dec 15, 2015 10:55 am

OK, great. Happy to test, this is good stuff.
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

dmac
Posts: 34
Joined: Wed Dec 30, 2009 8:38 am
Weather Station: Davis Vantage Vue
Operating System: Windows Home Server 2012
Location: Sparkwell, Devon, UK
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by dmac » Sun Dec 20, 2015 5:28 pm

Please tell me where and what to place the update file. I have not been able to use the update part of your script successfully.

Thanks.

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

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by jank » Sun Dec 20, 2015 7:17 pm

dmac wrote:Please tell me where and what to place the update file. I have not been able to use the update part of your script successfully.
Thanks.
Hi dmac
You can place the update file wherever you like. for exmaple, mine is place in /tmp.
Please look below what you should see, when calling sudo ./cumulusmx.sh -u

This Option will update your CumulusMX Version based on a new CumulusMXDISTxxxx Zip File
Enter path and filename of the Cumulus Update file - use TAB for Filename completion: /tmp/CumulusMXDist3036.zip

I found this file: /tmp/CumulusMXDist3036.zip - Size: 6385341 Bytes

Do you want to stop CumulusMX and extract /tmp/CumulusMXDist3036.zip into /CumulusMX/ ? [Y/n]y
Any folder in the Update Archive file which should not be extracted to /CumulusMX/? Insert name of the folder (example: web ): web

Folder <web> in the zip will not be extracted to /CumulusMX/

Beginning with Update of Cumulus MX v.3.0.0 build 3032 - File: /tmp/CumulusMXDist3036.zip will be extracted to /CumulusMX/
Press any key to continue... or CTRL+C to quit
CumulusMX is being stopped - extracting Update File now

Archive: /tmp/cumulusmx_update.zip
replace /CumulusMX/acknowledgements.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename:



I am not sure, what happened when you try to use the update option......btw: The Script is looking for Steve's original Zip file and I think the name is always CumulusMXDistxxxx.zip
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

slashmusic
Posts: 219
Joined: Sun Jan 10, 2010 10:43 am
Weather Station: WS2350
Operating System: Raspberry Pi2 - Debian
Location: Germany
Contact:

Re: CumulusMX - Linux/RasperryPi- Start | Stop | Restart Sc

Post by slashmusic » Tue Dec 22, 2015 6:50 pm

Version 2.4.0 is available [22.12.2015]

+ Check if last shutdown of CumulusMX was successful or if CumulusMX crashed
+ Print MONO Version in Status screen
o PID file will be saved to /tmp in case of RaspberryPi crash or reboot without stopping CumulusMX, old PID file will be automatically deleted when saved in /tmp
o included /mnt folder in search_for_Install directory since people may install on a external drive mounted to /mnt
+ cumulusmx.sh will now use a seperate conf file - cumulusmxsh.conf for settings
o Get Cumulus Version String directly from the forum page to avoid displaying beta versions
o Fixing a bug with (Update) -u if no Directory will be excluded from update (Empty Zip File)

++ Changed to run as non root
+ Fixing Permission Bug when called as non root (sudo) -> DD Backup - -b -d - needs to be called as root (sudo)
+ Check if conf file cumulusmxsh.ini exist
+ added check if user who startet CumulusMX has permissions to all files

Attention: Since Version 2,4.0 this script might be called without sudo. In this case, the Script is checking if the owner of all Files in the CumulusMX Folder belong to the owner who is calling this script, to avoid permission problems writing into files which were previously created as root (this will be alerted in the script)

New version is available in the first Post
Last edited by slashmusic on Sat Dec 26, 2015 10:24 am, edited 1 time in total.
Image

dmac
Posts: 34
Joined: Wed Dec 30, 2009 8:38 am
Weather Station: Davis Vantage Vue
Operating System: Windows Home Server 2012
Location: Sparkwell, Devon, UK
Contact:

Re: CumulusMX - RasperryPi - Start|Stop|Restart Script V2.4

Post by dmac » Tue Dec 22, 2015 9:03 pm

Yes all works. zip folder in /tmp

I was putting the extracted folder in tmp

Thanks

User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - RasperryPi - Start|Stop|Restart Script V2.4

Post by jpsc » Wed Dec 23, 2015 3:04 pm

I have updated to 2.4.0, good to see you have a .conf file.

A couple of problems, the .conf file should be found if it is in the same directory as the script:

Code: Select all

pi@WeatherServer3 ~ $ sudo ./cumulusmx.sh -s

     Collecting Information from your system, please wait.......



Attention: Configuration File: cumulusmxsh.conf not found. Neither in /etc/cumulusmxsh.conf nor /mnt/thumb/CMX/cumulusmxsh.conf
Please make sure, that the Configuration File exist in one of these two locations


pi@WeatherServer3 ~ $ ls -hls cumulus*
 56K -rwxr-xr-x 1 pi pi  53K Dec  7 22:48 cumulusmx0.sh
 56K -rwx--x--x 1 pi pi  56K Dec 22 19:33 cumulusmx.sh
4.0K -rwx------ 1 pi pi 1.6K Dec 22 19:17 cumulusmxsh.conf
 12K -rwxr-xr-x 1 pi pi 8.6K Dec  7 22:48 cumulusnow0.sh
leading to the second thing which is that you still have to edit the script to set IPATH, that could be in the .conf file if it could be found local to the script.

Apart from shutdown problems http://sandaysoft.com/forum/viewtopic.php?f=27&t=14637 the previous version was working well, but because of other issues I did not raise it at the time. I will monitor the new version to see if it reoccurs.
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

User avatar
jpsc
Posts: 163
Joined: Tue Aug 23, 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Jessie
Location: Wye valley, Herefordshire, UK
Contact:

Re: CumulusMX - RasperryPi - Start|Stop|Restart Script V2.4

Post by jpsc » Wed Dec 23, 2015 4:17 pm

oh, and uptime -p doesn't work:

Code: Select all

pi@WeatherServer3 ~ $ uptime -p
uptime: invalid option -- 'p'

Usage:
 uptime [options]

Options:
 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see uptime(1).
pi@WeatherServer3 ~ $ uptime -V
uptime from procps-ng 3.3.3
John Cooper

Cumulus MX on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image

Post Reply