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.
slashmusic
Posts: 219
Joined: Sun 10 Jan 2010 10:43 am
Weather Station: WS2350
Operating System: Raspberry Pi2 - Debian
Location: Germany
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by slashmusic » Thu 14 May 2015 9:17 pm

swyman18 wrote:Hi,

Downloaded new version of script and it is working on Ubuntu now. Thanks!

Ideally, I would love to be able to run MX without having to use screen. I've been having some issues where screen seems to stop randomly, not sure what's causing that. But I think screen is the only option to be able to run headless for now.
thanks for the Update. Glad to hear,the Script is working also on other Linux Versions.
Unfortunately i asume there is no other option so far to get it running without using screen.
But this is something Steve may answer
Image

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by steve » Fri 15 May 2015 7:55 am

I run my Pi headless without screen, I just use VNC. But I don't really know what screen gives you. Presumably you're not running a GUI on the Pi, so can't use VNC?
Steve

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

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by slashmusic » Fri 15 May 2015 9:00 am

steve wrote:I run my Pi headless without screen, I just use VNC. But I don't really know what screen gives you. Presumably you're not running a GUI on the Pi, so can't use VNC?
Hello Steve
Ibn my case, headless means: I don't have a graphical userinterface on my Pi to not waste to much resources I never need.
All my Pi's are a kind of Server and I am only connecting using SSH.
screen.jpeg
This is what I see directly after booting the PI and connecting by using SSH
So when I want to close this SSH session , screen will make it possible to further run.
And regarding VNC: What happens if you shutdown the Workstation where VNC is running? I assume, the session will be killed?
You do not have the required permissions to view the files attached to this post.
Image

water01
Posts: 1477
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by water01 » Fri 15 May 2015 9:18 am

VNC runs as a server an a client. So you run the VNC server on RPi and the server on any other machine i.e. Windows.

When the client disconnects the server just sits there waiting for another connection so the RPi just sits and runs as though nothing has conneted.

I use it all the time to manage my RPi which is running Kodi, and Ubuntu box that is running MythTV and I use a W7 machine as the client. Allows me run all my media servers headless.

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

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by slashmusic » Fri 15 May 2015 9:29 am

Hi
I just searched for this Topic in the internet and found this ( I used the first Google result)

vnc requires x, you can't access a desktop that doesn't exist.

I am not sure if this still is needed to run VNC? But as I already mentioned, I have no X or other GUI installed on my PI
Image

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by steve » Fri 15 May 2015 10:36 am

slashmusic wrote:Ibn my case, headless means: I don't have a graphical userinterface on my Pi to not waste to much resources I never need.
All my Pi's are a kind of Server and I am only connecting using SSH.
My Pi is a server too, but I run a GUI, so I can connect with either SSH or VNC. I don't seem to need the resources that the GUI uses, my CPU usage is never more than a few percent. What are you doing with the resources that you are saving by not running a GUI?
Steve

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

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by slashmusic » Fri 15 May 2015 11:03 am

Steve

I am saving Heat :-)
Look for my laod: load average: 0,34, 0,56, 0,73

I am less than 1 percent not using any gui.
My plans for the future are: the Raspberry Pi should be placed near the Weatherstation, which will be directly under the roof. this might avoid these connection losses when using wirelss connections from the sensors to the Station.
I am using a LaCrosse and often in the winter month, I am getting connection losses so I want to use the wired mode.
With wired mode, I am under the roof which is okay in the winter month, but when having Summer I need to avoid high heat.
My current CPU temp is: vcgencmd measure_temp -> temp=40.1'C which should be okay also under the roof.

:ugeek:
Image

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by steve » Fri 15 May 2015 11:12 am

My load averages, running a GUI (LXDE), and while connected via VNC are 0.03, 0.06, 0.05. My cpu temp is 35.8C. LXDE apparently uses about 80MB of memory.
Steve

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

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by slashmusic » Fri 15 May 2015 11:20 am

steve wrote:My load averages, running a GUI (LXDE), and while connected via VNC are 0.03, 0.06, 0.05. My cpu temp is 35.8C. LXDE apparently uses about 80MB of memory.
sorry Steve...I posted the values form my Banana Pi which is having a lot more processes and workload
load average: 0,00, 0,01, 0,05 temp=40.1'C but as you can see, the temperature is higher....seem to be the room temperature is higher than in Scottland at the moment

Anyway, there are enough arguments to run a Pi without Windows system and there are maybe enough to run it with.....
when running without Window, there is no other option than using Screen.
Image

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop Script

Post by steve » Fri 15 May 2015 11:26 am

slashmusic wrote:Anyway, there are enough arguments to run a Pi without Windows system and there are maybe enough to run it with.....
Absolutely - I'm not trying to convince anyone to run a GUI. I just find it very convenient, and the resources used are not significant for me.
Steve

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

Re: Cumulus MX - Raspberry Pi - Start | Stop Restart Script

Post by slashmusic » Sat 16 May 2015 5:21 pm

With the most current Version (1.7) of my Script you can also restart CumulusMX.
Calling sudo ./cumulusmx.sh -r will restart Cumulus immidiately

This will give the abillity to resatart the script via cron without being prompted to confirm the stop of Cumulus first.
Image

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

Re: Cumulus MX - Raspberry Pi - Start | Stop | Restart Scri

Post by slashmusic » Wed 20 May 2015 6:35 pm

With version 1.8, I added the abillity to use more parameters

If you call the script with -r, it will immidiately restart CumulusMX (sudo ./cumulusmx.sh -r)
If you call the script with -q, it will immidiately quit Cumulus, sending a CTR+C (sudo ./cumulusmx.sh -c)
If you call the script with -s, it will display the status of CumulusMX - Also when not running (sudo ./cumulusmx.sh -s)
If you call the script with -h, it will display a Help Screen with the list of available commands (sudo ./cumulusmx.sh -h)
If you call without Paramaters it will find out, if Cumulus is running or not and will ask to start or in case it's running, ask to stop.

I think everything is done and this will be the last/final version.
Image

swyman18
Posts: 61
Joined: Fri 24 Apr 2009 5:27 am
Weather Station: Davis Vantage Pro2
Operating System: Ubuntu Server 14.04
Location: Honoka'a, HI

Re: Cumulus MX - Raspberry Pi - Start | Stop | Restart Scri

Post by swyman18 » Fri 22 May 2015 8:40 pm

Hi Slash,

Thanks for a great script... one thing I noticed is that I was having some issues getting the -r parameter to work. When CumulusMX tried to restart after stopping, I would get some "invalid path" errors in the screen session. Putting "cd $INSTPATH" prior to the screen command (similar to how it is in the main section) appears to solve the issue.

This is on Ubuntu Server, perhaps it was losing track of the install path. Figured I would mention it in case others run across the same problem.

-Scott

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

Re: Cumulus MX - Raspberry Pi - Start | Stop | Restart Scri

Post by slashmusic » Fri 22 May 2015 9:10 pm

swyman18 wrote: Thanks for a great script... one thing I noticed is that I was having some issues getting the -r parameter to work. When CumulusMX tried to restart after stopping, I would get some "invalid path" errors in the screen session. Putting "cd $INSTPATH" prior to the screen command (similar to how it is in the main section) appears to solve the issue.

This is on Ubuntu Server, perhaps it was losing track of the install path. Figured I would mention it in case others run across the same problem.
-Scott
Hi Scott
I can not reproduce this error on my Raspberry (Debian) regardless from which folder I call the script, because the next line in this Script after the "cd $INSTPATH" is:

screen -dmS $SERVICE -amds bash mono $INSTPATH/CumulusMX.exe -port 9999

So "screen" does not need a path, "mono" also does not need a path and I am calling CumulusMX with the path at the beginning. I have no Idea, why I need to be in the installation folder first.
btw: I have also no Idea, why I did this in the Main part of my Program but....if a simple cd $INSTPATH solves your problem, I added this to my Script and once the next verison will be released, this line will be in there. I really appreciate all your suggestions and comments regarding this Script.
At my work (Technical Support in a large IT Company), I need to work with Linux (especially Suse Enterprise 11) Servers and this scripting exercise will help me much to learn all these things

Next on my Agenda for this Script will be: With this Script I force everybody to accept to run cumulus on port 9999 (without changing the script) I want to change the script to accept a second Parameter ($2) as a Port. If no second Parameter, the default 9999 will be used. "sudo ./cumulusmx.sh -r 8080" for example. this should be possible :-)
Image

water01
Posts: 1477
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Cumulus MX - Raspberry Pi - Start | Stop | Restart Scri

Post by water01 » Fri 22 May 2015 9:18 pm

Cumulus MX default port is 8998, not 9999, you are forcing that with port command on the command line?

Post Reply