I just set my RPi to run CmX as a service. All appears to work fine so far.
I am curious about one thing though, after about 20 seconds or so I have two files created that are not created when I start CmX manually as I have always done previously.
My CmX folder is located at "/home/pi/CumulusMX". The created files are: /home/pi/CumulusMXrealtime.txt and /home/pi/CumulusMXwxnow.txt (next to my CmX folder, not in it).
Any idea why this is happening? Again, all appears to be working fine.
The attached MXdiags log is from a clean start up until the files are created then shut down.
Edit: Changing "AutoUpdate=1" to "AutoUpdate=0" in the FTP section of Cumulus.ini stops the creation of CumulusMXrealtime.txt (I don't use FTP uploading). No clue on CumulusMXwxnow.txt - the only instance of this on the whole internet seems to be this thread
I still don't see anything not working properly, but am still curious
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 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Run as Service Question
Moderator: mcrossley
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Run as Service Question
You do not have the required permissions to view the files attached to this post.
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Run as Service Question
Could you try changing the home path in the service file to "/home/pi/CumulusMX/" and see if that fixes it?
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Run as Service Question
Already is - Here is my service file, I took it from the pre-made image on the download page and did some editing. The "ExecStartPre" line was added because without it, the sockets would connect on a manually start, but not after a reboot.
The restart entries is what took me down this route to start with. I have always had CmX loose contact with my WifiLogger (and MeteoBridge before that) a couple times a week. But lately it has been happening several times a day. I was thinking about getting a MeteoPi so that the connection was hard wired then saw it mentioned that when CmX is installed as a service, that is can be set to restart on failure - problem solved.
Closing in on 24 hours and still everything seems to be working perfectly.
The restart entries is what took me down this route to start with. I have always had CmX loose contact with my WifiLogger (and MeteoBridge before that) a couple times a week. But lately it has been happening several times a day. I was thinking about getting a MeteoPi so that the connection was hard wired then saw it mentioned that when CmX is installed as a service, that is can be set to restart on failure - problem solved.
Closing in on 24 hours and still everything seems to be working perfectly.
Code: Select all
[Unit]
Description=CumulusMX service
After=network-online.target
[Service]
User=root
Group=root
ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.* Synchronized to time server"'
ExecStart=/usr/bin/mono-service -d:/home/pi/CumulusMX CumulusMX.exe -port 8756 -wsport 8888 -service
Type=forking
ExecStopPost=/bin/rm /tmp/CumulusMX.exe.lock
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
-
- Posts: 92
- Joined: Sat 26 Dec 2020 2:21 pm
- Weather Station: Davis
- Operating System: Raspbian
- Location: Near Glasgow, Scotland, UK
Re: Run as Service Question
If you google wxnow.txt (which is what the filename is meant to be), you'll find plenty hits, including the Cumulus Wiki, where there is a description of the content of that file.
I think the error that you have is a missing '/' between the path and the filename (for both files) - hence Mark suggested checking the path settings - then you should get both files correctly named and correctly located. I don't know the Service file structure, but maybe there is meant to be a closing '/' in your -d parameter to make
Code: Select all
-d:/home/pi/CumulusMX/
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Run as Service Question
The "/" did not make a difference and all uploads were already disabled.
I decided to start CmX the way I always have in the past and discovered that realtime.txt and wxnow.txt were created inside the CmX folder - no CumulusMX in front of the file names. Obviously they have always been created and I just never noticed them beings they are surrounded by other files rather than just the 4 folders I have in /home/pi were they stuck out like sore thumbs.
As suggested, I searched for wxnow.txt and the first hit was the Cumulus Wiki. It said to put "CreateWxnowTxt=0" in the station section of Cumulus.ini to disable its creation. Although it was referring to older versions it worked. I had already figured out how to stop realtime.txt from being created so the mystery is solved
Thanks!
I decided to start CmX the way I always have in the past and discovered that realtime.txt and wxnow.txt were created inside the CmX folder - no CumulusMX in front of the file names. Obviously they have always been created and I just never noticed them beings they are surrounded by other files rather than just the 4 folders I have in /home/pi were they stuck out like sore thumbs.
As suggested, I searched for wxnow.txt and the first hit was the Cumulus Wiki. It said to put "CreateWxnowTxt=0" in the station section of Cumulus.ini to disable its creation. Although it was referring to older versions it worked. I had already figured out how to stop realtime.txt from being created so the mystery is solved
Thanks!
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Run as Service Question
You can disable wxnow via the settings... Internet Settings > Interval Configuration > Normal Interval > Standard File Settings
The mystery is why it was not working correctly when running as a service. I have not come across that before. On my rPi I run as a service and the files are created within the CumulusMX folder as expected (though I normally have them disabled).
The mystery is why it was not working correctly when running as a service. I have not come across that before. On my rPi I run as a service and the files are created within the CumulusMX folder as expected (though I normally have them disabled).