Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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: CumulusMX init.d System Startup Script

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

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: CumulusMX init.d System Startup Script

Post by jank »

BigOkie wrote:[I believe running 'update-rc.d cumulusmx defaults', then running 'update-rc.d cumulusmx enable' solved that issue.
OKay, this makes sense and I am gladf to hear that there was one person who solved the problem this way.

I am not 100% but I have also the feeling that form time to time the ownership of 1 file in the folder changed.
In the past I started and stopped CumulusMX many times because of changing something in my script, updating CumulusMX etc....and each ime when I cam accross the ownership problem I was not sure how I started cumulusmx last time. Pi or root .....but 2 days ago, I was 100% sure that I did it as pi and after I rebooted my Pi I noticed that the init.d script did not started CumulusMX. So I stated it manually and found out, that there was 1 file in the Cumulus folder which does not belong to user pi.

So lets see how things are going in the next days / week.
Btw: Uptime of my Raspberry was more then 200 days (if aynone is interested to know)
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
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: CumulusMX init.d System Startup Script

Post by jank »

I found something strange :groan: in the code of cumulusmx.sh which prevented the /etc/init.d/cumulusmx startup script to start cumulusmx.sh successfully, if the CumulusMX folder was installed on a USB Stick/External Drive. :ugeek:

I can not explain, but a command failed for any reason when CumulusMX was not installed on the root device

I will provide a new version of the cumulusmx.sh Start/stop script soon.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

Ive followed a few instructions on here and got cumulusmx installed on raspberry pi3 b running RASPBIAN JESSIE WITH PIXEL 2017-01-11

Ive followed the instructions on here to have cumulus to start at boot .
When i type
chkconfig |grep cumu
It says
cumulusmx on

but its not on as its not uploading to wunderground nether can i access the local page dials etc.

I can start cumulus by entering in cumulusmx folder terminal
sudo mono CumulusMX.exe
It works uploading to wunderground and the local page works.

any ideas what could be wrong ?
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

Have you installed Screen?

Code: Select all

sudo apt-get install screen
It sounds like CumulusMX is closing when you close the terminal or SSH session. You need Screen installed so CumulusMX can run in the background in it's own screen session after you close the terminal window. If you install Screen you can use the start stop script to open a screen and run it for you at boot up.
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

yes i have installed screen and have just tried to reinstall it .

pi@raspberrypi:~ $ sudo apt-get install screen
Reading package lists... Done
Building dependency tree
Reading state information... Done
screen is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.

ive run

pi@raspberrypi:~/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (United Kingdom)
Serial: 74FECEABEB2DA94ECB5EBA0CD11A7137
Cumulus MX v.3.0.0 build 3043
Today.ini = data/today.ini
Last update=2017-02-22T16:30:00
Connected to station
16:45:24 Downloading Archive Data
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
22/02/2017 16:45:25
Type Ctrl-C to terminate
16:45:25 Downloading Archive Data
16:45:25 Normal running

and closed the terminal window and it continues to run fine in the background.

ive restarted the pi and its not running at boot ?
when i run
pi@raspberrypi:~ $ chkconfig |grep cumu
cumulusmx on

it says its on but its not running updating ?
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

You have screen installed but I am not seeing where you are actually opening a screen to run CumulusMX. You can open a screen by just typing "screen". Then type"sudo mono CumulusMX.exe" in the CumulusMX directory to start CumulusMX. To detach the screen and get back to terminal hit cntl +a +d. Type "screen -ls" to check that the screen is still running with CumulusMX.

Jank's start stop script automates this all for you. Since I run Jank's script as user root to check it I have to type "sudo screen -ls" like this:
pi@raspberrypi:~ $ sudo screen -ls
There is a screen on:
12340.CumulusMX (01/31/2017 08:30:10 AM) (Detached)
1 Socket in /var/run/screen/S-root.
Could you try "screen -ls" and "sudo screen -ls" to see if there is really a detached screen running CumulusMX?
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

ive have never typed screen in before, sorry this is all new to me .
i have been running cumulus from the cumulus folder / terminal


pi@raspberrypi:~/CumulusMX $ screen -ls
There are screens on:
1245.pts-0.raspberrypi (22/02/17 20:33:20) (Detached)
1197.pts-0.raspberrypi (22/02/17 20:32:03) (Detached)
1166.pts-0.raspberrypi (22/02/17 20:31:21) (Detached)
3 Sockets in /var/run/screen/S-pi.

pi@raspberrypi:~/CumulusMX $ sudo screen -ls
No Sockets found in /var/run/screen/S-root.

pi@raspberrypi:~/CumulusMX $



Ok ive just restarted the pi and done the same again

pi@raspberrypi:~/CumulusMX $ sudo screen -ls
No Sockets found in /var/run/screen/S-root.

pi@raspberrypi:~/CumulusMX $ screen -ls
There is a screen on:
1257.pts-0.raspberrypi (22/02/17 20:48:30) (Attached)
1 Socket in /var/run/screen/S-pi.

pi@raspberrypi:~/CumulusMX $



sorry i am really getting confused with this now lol . ive restarted pi again

i went to the cumulus folder
i opened terminal
i typed screen /enter/ screen opened
space bar / space bar / exit screen
back to terminal
i typed sudo mono cumulusmx.exe
cumulus running / closed the terminal window / running in background now

i opened terminal typed
sudo screen -ls
screen -ls

pi@raspberrypi:~ $ sudo screen -ls
No Sockets found in /var/run/screen/S-root.

pi@raspberrypi:~ $ screen -ls
There is a screen on:
1370.pts-0.raspberrypi (22/02/17 21:32:08) (Detached)
1 Socket in /var/run/screen/S-pi.
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

If I followed all that correctly you opened a screen and then switched back to terminal and ran CumulusMX. You need to start CumulusMX when you in screen and then you can switch back to terminal mode. Then you can detach the screen session and go back to terminal. By doing that CumulusMX will run until you reboot. Your screen -ls results show nothing running in a screen.
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

yes only because i could not type sudo mono CumulusMX.exe into the actual screen window ?
I take it as long as the screen window is open it does its job , and i have to run another terminal window from cumulus folder to enter the sudo mono CumulusMX.exe while the screen window is open also , and once cumulus has started i can cntl a+d on the screen window and close it , and close the cumulus window .

Ive done that above and cumulus is running now in the background . but will it start at boot by its self if i reboot the pi ?

I have x11vnc installed also to control the pi from my pc. it starts on its own every boot and i need cumulus to do this also .

pi@raspberrypi:~ $ sudo screen -ls
No Sockets found in /var/run/screen/S-root.

pi@raspberrypi:~ $ screen -ls
There is a screen on:
1170.pts-0.raspberrypi (23/02/17 00:59:29) (Detached)
1 Socket in /var/run/screen/S-pi.
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

Try typing "screen bash". Then run CumulusMX. Then disconnect the screen by hitting cntl-A then release and hit D. Now you should be back in terminal with CumulusMX running in a screen. You can check by typing "screen -ls".
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

ok done that

screen bash
sudo mono cumulusmx.exe wait till its running then
cntl-a release and d

i get these results

[detached from 1167.pts-0.raspberrypi]
pi@raspberrypi:~/CumulusMX $ screen -ls
There is a screen on:
1167.pts-0.raspberrypi (23/02/17 01:52:24) (Detached)
1 Socket in /var/run/screen/S-pi.


cumulus is now running in background ok


I have now rebooted the pi but cumulus did not start. it is not updating to wunderground nor can i connect to my local page.

if i run in terminal chkconfig it says cumulus on ? . does this data mean it should autorun at boot or am i mistaken ?

cumulusmx on
Last edited by novy on Thu 23 Feb 2017 4:32 am, edited 1 time in total.
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

Manually running screen and CumulusMX does nothing on reboot. You need to run a script to run CumulusMX on reboot. Go back and read the first post in this topic and follow the instructions.
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
User avatar
novy
Posts: 32
Joined: Thu 16 Feb 2017 2:37 pm
Weather Station: davis vantage vue
Operating System: Windows 7 / RASPBIAN
Location: Scotland

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by novy »

ok i just tried that again still not working. had enough tonight try again tomorrow

i wonder if it could be anything to do with using berryboot ?

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: CumulusMX init.d System Startup Script

Post by jank »

Hello Novy, I am not sure, but when I read all your posts, it looks like, that you did not fully understood some things.
When you start with linux, it is much more complicated then Windows....so let me give you a summary.

You installed CumulusMX and it is working when you start it manually.
you have installed the Init.d Start Script in /etc/init.d/cumulus but you have not installed the main start stop script.

When you start a program in Linux (as you did with Cumulus - sudo mono CumulusMX , Cummulus will start, but the terminal window you opened is being used to run this program. In the moment, when you close this terminal, the program will be stopped. this is the reason why you use Screen.
with the program screen, you can run programs in the background ---> Since the usage of screen is complicated I wrote a CumuluxMX start/stop script which is doing all this for you. -----> Please read this post: https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13767
this makes it easy to handle CumulusMX on a Linux system. you only need to type: sudo cumulusmx.sh -h to see all options.
this script will start cumulusmx for you, it can stop it, it can restart it it can crate backups and a lot of more things.
Once this script was running, some people asked me, if it is possible to start CumulusMX automatically when the pi starts.
To realize this, I wrote a second System Init script (similar to the startup folder in Windows) which is starting the cumulusmx.sh script which is starting CumulusMX.
---> System Boot ----> /etc/init.d/cumulusmx --------------> cumuluxmsh.sh script ------------> CumulusMX

you have not installed the cumulusmx.sh script but the init.d script.......But the init.d script can not start CumulusMX without the cumulusmx.sh script :-) Sounds complicated ? :ugeek:
This is how I understand your problem.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
VTHokie74
Posts: 113
Joined: Tue 10 Apr 2012 12:58 am
Weather Station: Davis Vantage Pro 2
Operating System: Rasbian
Location: Ashland, KY

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by VTHokie74 »

jank, I think you are correct. I assumed he had already installed the main start stop script. That would explain it.
Station: Davis Vantage Pro 2/CumulusMX/Raspberry Pi 3
Post Reply