If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post 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.
jank
Posts: 292
Joined: Sat Jun 13, 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

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

Postby jank » Thu Oct 06, 2016 11:07 am

fonixmunkee wrote:Just started playing around with Cumulus MX and this script is a life-saver. Thank you very much!

You are welcome. Exactly this was my intension last year,
when I started one year ago.
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

Kipuka
Posts: 24
Joined: Thu Sep 15, 2016 9:51 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Win 10

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

Postby Kipuka » Mon Oct 10, 2016 9:01 pm

I am hoping to use this script to start cumulusmx as boot up. Power supply here is pretty didgy so it is essential that i can get cmx to restart when the power comes back on. In a perfect world i have a script to boot the rpi when power returns and then this script to restart cmx once rpi has booted. my irrigation system is dependent upon data from my weather station which it gets from WU, CMX, VP2 so if CMX is down the irrigation system is not able to function properly.

so far i have installed the script and updated the conf file to reflect the appropriate ipath. the script runs fine using sudo ./...

I am stuck trying to get the script to run at boot up. i dont see anything in your lines to be inserted in cron that just say, run this script at boot up. and i am guessing that if i create a file in /etc/init.d that contains the command for launching the script...but i am not sure how to do this.

Can someone please help me to understand how to make it so this script will run at boot up? And if there is some way to make it so the rpi boots at the resumption of power, that would be perfect.

thanks!

Mark

User avatar
VTHokie74
Posts: 130
Joined: Tue Apr 10, 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

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

Postby VTHokie74 » Tue Oct 11, 2016 1:23 am

I tried editing crontab to add an @reboot ... entry to start Cumulus on a reboot. I could not get it to work. jamk has another option discussed in this topic:

viewtopic.php?f=27&t=14753

The init.d method worked for me. Also you might want to run raspi-config and choose the option to wait on network at reboot. I found this allows my router and modem to boot up after a power failure.
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3

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

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

Postby jank » Tue Oct 11, 2016 10:29 am

VTHokie74 wrote:I tried editing crontab to add an @reboot ... entry to start Cumulus on a reboot. I could not get it to work. jamk has another option discussed in this topic:
viewtopic.php?f=27&t=14753
The init.d method worked for me. Also you might want to run raspi-config and choose the option to wait on network at reboot. I found this allows my router and modem to boot up after a power failure.

I also want to mention, that some people had also trouble to get the init.d script working (for any reason I don't know)
In this case, in the most current version of the CumulusMX Start|Stop script, there is a new option which is a kind of watchdog.
In simple words, you create a new Cron entry which is checking every 10 minutes, if CumulusMX is running.
If not, it will be started,
if yes, nothing happens.
Disadvantage: In case you want to make some maintenance work on your raspberry pi and want to stop CumulusMX, it will be started every 10 Minutes :-)

Please see this post: http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767&p=120459#p120459

For all who have trouble strating CumulusMX with the init.d Startup Script at system boot, here is a command to check, if the init.d startup scirpt is correctly inserted into the runlevel of your system.
1) install a small program called: chkconfig
sudo apt-get install chkconfig
2) run the command to check if the startup script should be started at system boot
chkconfig |grep cumu
as a result you should see:

cumulusmx on

If you not see this result (line), you probably missed to enter the following command to insert the startup script into the runlevels

sudo update-rc.d cumulusmx defaults
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

takezo
Posts: 36
Joined: Fri Nov 18, 2016 2:18 pm
Weather Station: raspberry pi
Operating System: debina

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

Postby takezo » Fri Dec 02, 2016 12:26 pm

Hi All!

I use to run cumulusMX scripts from this link:


apparently the script start cumulusmx correctly but dashboard doesn't show nothing. I have try to run the service without the script and I have seen next error starting the service:


Code: Select all

takezo@-WEATHER:~/scripts/Cumulus/CumulusMX $ sudo mono CumulusMX.exe
Current culture: Spanish (Spain)
Serial: C1C14BD8D8C0C9F8B78320EFD1263EE1
Cumulus MX v.3.0.0 build 3041
Today.ini = data/today.ini
Last update=2016-12-01T12:30:00
Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
sysname=Linux release=4.4.34 machine=armv6l
Fine Offset station found
Connected to station
Error reading data from station - it may need resetting
Error reading data from station - it may need resetting
Error reading data from station - it may need resetting
Error reading data from station - it may need resetting
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException: Address already in use
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
  at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port, Boolean secure) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.GetEPListener (System.String host, Int32 port, System.Net.HttpListener listener, Boolean secure) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
  at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00000] in <filename unknown>:0




any idea..?

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

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

Postby water01 » Sat Dec 03, 2016 10:52 am

You need to reset your station, this has nothing to do with the script.

On a point of order posting the same query in multiple Topics will not get you an answer any quicker and is consider bad forum manners.

BigOkie
Posts: 210
Joined: Tue May 28, 2013 1:06 am
Weather Station: Davis VP2
Operating System: Raspian Jessie
Location: Tulsa, OK

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

Postby BigOkie » Fri Jan 20, 2017 9:42 pm

Jank,

I noticed in the last two version updates of your script that the version check seems to have mismatched text.

Here's what I see on the last one:

Code: Select all

Version check
CumulusMX   Version: Cumulus MX v.3.0.0 build 3042 - Available Version: ://sa
This Script Version: 2.5.3.0 (2016-09-27) - Available Version: 2.5.3.0 (2016-09-27)
CumulusNow  Version: 1.3 - Available Version: 1.4 (12.09.2016)
Linux  OS   Version: "Raspbian GNU/Linux" - DEBIAN - 8 (JESSIE) - 4.4.13-v7+
Mono Version: Mono JIT compiler version 4.0.5 (Stable 4.0.5.1/1d8d582 Thu Nov 12 12:22:41 UTC 2015)


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

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

Postby steve » Fri Jan 20, 2017 9:48 pm

Sorry - have I broken this by changing the version number in the news panel into a link to the announcement post?
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Like Cumulus and want to support it? Please donate! Image

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

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

Postby jank » Fri Jan 20, 2017 10:34 pm

steve wrote:Sorry - have I broken this by changing the version number in the news panel into a link to the announcement post?

Yes, I will fix it with an Update this Weekend.
Should Not be a Problem, Steve
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: 218
Joined: Sun Jan 10, 2010 10:43 am
Weather Station: WS2350
Operating System: Raspberry Pi2 - Debian
Location: Germany
Contact:

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

Postby slashmusic » Sat Jan 21, 2017 5:28 pm

Version 2.5.3.1 is available [21.01.2017]

o fixed CumulusMX version check since Steve modified the Forum website.


(Attention: People who already using a cumulusmxsh.conf and updating from an earlier Version do NOT need to add new parameters or replace their existing cumulusmxsh.conf with the file in this update.
When running the script the first time, new Parameters will be added automatically to cumulusmxsh.conf)

New version is available in the first Post
Image

dazza1223
Posts: 171
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: davis vantage vue
Operating System: raspberry pi 3
Location: worthing
Contact:

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

Postby dazza1223 » Thu Jan 26, 2017 11:17 pm

o hi there ive downloaded the cumulusmx.sh and
ive
CumulusMX_HOME=/home/pi/USB/Davis
CumulusMX_USER=pi
but whern i reboot i do the /etc/init.d/cumulusmx status
command and i get a error

Jan 26 23:05:46 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX... Service not running


and where i run the Start Script cumulusmx.sh to start CumulusMX
right at the top i get a error saying (find: `/tmp/CumulusMX.pid': No such file or directory)
but it still starts

BigOkie
Posts: 210
Joined: Tue May 28, 2013 1:06 am
Weather Station: Davis VP2
Operating System: Raspian Jessie
Location: Tulsa, OK

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

Postby BigOkie » Fri Jan 27, 2017 1:40 am

dazza1223 wrote:o hi there ive downloaded the cumulusmx.sh and
ive
CumulusMX_HOME=/home/pi/USB/Davis
CumulusMX_USER=pi
but whern i reboot i do the /etc/init.d/cumulusmx status
command and i get a error

Jan 26 23:05:46 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX... Service not running


and where i run the Start Script cumulusmx.sh to start CumulusMX
right at the top i get a error saying (find: `/tmp/CumulusMX.pid': No such file or directory)
but it still starts


The one about the service I have no idea.

However, the second one referring to /tmp/CumulusMX.pid is expected. That file is only present when Cumulus is running. When you first start that message is expected since it's not present because CMX isn't running.

dazza1223
Posts: 171
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: davis vantage vue
Operating System: raspberry pi 3
Location: worthing
Contact:

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

Postby dazza1223 » Fri Jan 27, 2017 10:29 am

o ok so that one.... and yh it say somthink about waiting for usb drive to mount and then it time out

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

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

Postby jank » Fri Jan 27, 2017 10:49 am

dazza1223 wrote:o ok so that one.... and yh it say somthink about waiting for usb drive to mount and then it time out


I am absolutely sure, that your "Problem" is related to the etc/init.d/cumulus startup Script.
Let me explain how it works:
The init.d folder on linux can be compared to the Services in Windows.
The startup scripts in the init.d folder tell the Linux system in which runlevel a program should be started.
The Problem in my case is, that your installation is installed on a USB device and I fear, that the init.d start script is being called before the USB drive is mounted.
So I used a delay in this startup script to wait until theUSB drive has being mounted......but this does not always work (as in your case)
I also did the same for network settings....waiting for X seocnds until the Raspberry obtained an IP address when using DHCP or checking until network is available.....
For any reason, at least the "wait fur USB" often did not work properly.....
But, If you see these problems, but want ot start CumulusMX when you start the Raspberry, there is a workaround available.
First read this: viewtopic.php?f=27&t=13767&p=120756&hilit=Watchdog+Option#p120756 maybe this will solve your problem

If the article did not solve your problem, please use the workaround mentioned here: viewtopic.php?f=27&t=13767&p=120459#p120459

cheers 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

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

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

Postby slashmusic » Tue Feb 21, 2017 2:30 pm

Version 2.5.4.0 is available [21.02.2017]

o I fixed a long term issue. the init.d Script http://sandaysoft.com/forum/viewtopic.php?f=27&t=14753 will not start cumulusmx.sh when CumulusMX is installed on an external drive like USB Stick or USB Harddisk.
The Verison 2.5.4.0 will fix this problem. In additio to the settings which need to be made in the cumulusmxsh.conf file, you need to edit also the cumulusmx.sh script at line 16.
The correct path to the CumulusMX installation folder needs to be inserted. If CumulusMX is installed in /home/pi/CumulusMX nothing needs to be done. Only if installed in a path other then /home/pi/CumulusMX
sudo nano cumulusmx.sh
navigate down to line 16 ---> INSTPATH="media/usb/CumulusMX"
CTRL+O to save file
Image


Return to “Cumulus MX”

Who is online

Users browsing this forum: cirdan52 and 8 guests