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

Host to PING on program start-up

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

Post Reply
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Host to PING on program start-up

Post by Paul C »

Hi

I came across this setting today. "Host to PING on program start-up"

Would be handy if the computer would start/run MX without me fiddling on looking for an exe file etc every time I reboot the PC. I normally leave my PC running 24hrs, but with cost of power I am considering switching off at night.

Is this simple to setup and any recommendations for an IP address to put in the box.

Many thanks
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Host to PING on program start-up

Post by sfws »

This reply is not answering directly your pinging queries:
* pinging has not yet been documented in Wiki
* my understanding is that pinging is for checking network availability, not the context set in your post
* others, in a few forum threads, report pinging issues e.g. viewtopic.php?t=20235
* 2 developers have contributed MX coding for implementing pinging, getting pinging functionality right is not proving easy
* the main developer has already announced that he is experimenting with different pinging code in the release he coded as a beta about a fortnight ago, but has not released to everybody yet


If you do still intend to pursue implementing pinging given that context, please post again in this topic, and hopefully someone else will help you, i.e. someone with plenty of pinging experience who is better placed to answer your specific questions, and can supply accurate simple advice about pinging.

However, if your text below does represent your objectives, there are some other items that you might decide to consider, in your own time scale:
Paul C wrote: Sun 10 Apr 2022 6:30 pm Would be handy if the computer would start/run MX without me fiddling on looking for an exe file etc every time I reboot the PC. I normally leave my PC running 24hrs, but with cost of power I am considering switching off at night.
Start a new forum topic, with appropriate subject title, to pursue anything mentioned below.

1) Have you thought about running as Service, or adding a short-cut to "start" folder? Both approaches described there in Wiki can automatically restart MX when computer reboots. Others may take you through either alternative in step by step fashion if you say which you want to try.

2) Have you considered running MX on a computer that consumes less power? Perhaps read Wiki here or forum here as a starting point, but others can give more up-to-date advice with a steer on what you might try.

I understand that at present you may feel you already have enough complications to get used to.

Remember, migrating from the legacy software to MX cannot be described as easy for anyone, although the complexity obviously depends upon which parts of the MX functionality people choose to implement and how quickly they desire "perfection".
Pirate3000
Posts: 36
Joined: Fri 29 Jan 2021 3:56 pm
Weather Station: Ecowitt Wittboy + Extra Sensors
Operating System: Windows 10
Contact:

Re: Host to PING on program start-up

Post by Pirate3000 »

Hi there
If you want to start Cumulus MX on your windows startup then just make a task in task scheduler to rung cumulusmx.ece on startup and this will run everytime you start the pc, so even if you have a plug in timer once windows starts the tsk will run.

Thanks
Anything's possible with the weather.

https://www.hytheweather.co.uk
User avatar
HansR
Posts: 5964
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Host to PING on program start-up

Post by HansR »

@Pirate3000: Yes, that used to be the method but since the system service has been introduced that is by far the preferred method because it uses automatically the correct shutdown procedure. So: Use CMX as a service, don't use the scheduler for the main start and stop of CMX.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Host to PING on program start-up

Post by sfws »

1. Paul's post asks what internet location he should ping, therefore it is unlikely he really needs to delay MX starting until that unknown location is reached, so that is why I asked Paul to confirm he needs the pinging functionality. Anybody who does use the ping option (e.g. HansR) is not stopped from posting in meantime suggestions for where to ping.
2. Paul gave this thread a title Host to PING on program start-up, since the topic has wandered off into other subjects because of my earlier reply, I will respond to the newer posts here, although they are irrelevant to that title.
3. Perhaps Pirate3000 was just mentioning task scheduler because my post did not explicitly mention that. However, my post gave a link to a Wiki section that does in fact give instructions about what to enter in task scheduler as one of the options. I intentionally did not mention everything covered in the link although I deliberately mentioned running as service first. Pirate3000's post does not actually say whether he personally runs as service or using task scheduler, but it is perfectly correct to point out to Pirate3000 that there are advantages in running MX as a service.
4. I don't support the argument that running as a service is necessary for correct shutdown. Possibly what HansR means is that running as a service has (as an option) a way to stop the service tidily when a computer goes into sleep, or into hibernation. Or maybe he means that Windows OS will stop all running services as part of the "computer shutdown" procedure. While running interactively you need to disable sleep and hibernation modes, but for the most accurate outputs from Cumulus you would disable those anyway. Windows OS will output a message, and wait for a response (from operator or process), if any interactive processes are running when you manually request a shutdown.
5. Whether (PaulC or Pirate3000 or anyone else) decide to use service or an interactive auto-start is largely a question of whether they want to see progress messages or prefer the software runs hidden from view. Even running as a service will not close down correctly in a power cut or accidental unplugging of computer. MX shuts down correctly from an interactive session, it responds to a number of ways of requesting a close; not just "control and C", but also closing an open terminal session window, and closing terminal session by clicking close in task bar for a minimised window (all of this is explained at the mentioned Wiki link). Some people ran Cumulus 1 as a service, and some were running MX as a service long before Mark added the extra parameter into MX to automate the registry edit for those running under Microsoft Windows. Other people prefer to run interactively, it is a free choice.
6. Paul's post also mentioned a dislike of starting MX manually, and a desire to consume less power. Neither of those was posed as a question, but my reply picked up on those mentions although I suggested if he does want to pursue either of those, he should start a new forum topic where people could chip in with step by step instructions or discussion about merits of the different options. I would suggest any further discussion of using task scheduler or using a service is left to any new topic Paul (or anyone else) starts.
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Host to PING on program start-up

Post by Paul C »

Thanks for the replies

On the face of it the"ping" method looked easiest way to run on startup, but perhaps if MX is running, it wont ping ? - so I will leave that option alone.

It was mentioned I could move to a cheaper computer to run, well I have only got one computer so buying another that may be more efficient doesn't make any economical sense ( I dont want to buy a Raspberry if that is what you are thinking, I woulndt have a clue what to do with it)

I will attempt to add MX to my startup folder, appears the best way.

Perhaps (if Possible) moving forward that any new versions of MX had an option for Mx to automatically start when your computer starts, nice easy tick box, for folk like me. As well as installing updates automatically without the fear of losing what you have !! YES I have stuck with my original download and dont really what to tackle a new version, even though the flashing red light is telling me to do so. :D
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Host to PING on program start-up

Post by sfws »

Paul C wrote: Tue 12 Apr 2022 4:57 pm On the face of it the"ping" method looked easiest way to run on startup, but perhaps if MX is running, it wont ping ? - so I will leave that option alone.
After MX is started (by any way), the ping method is a way of delaying MX from actually doing any processing until the named web address is available. So as you now realise, it is not of use to you.
Paul C wrote: Tue 12 Apr 2022 4:57 pmAs well as installing updates automatically without the fear of losing what you have !!
YES I have stuck with my original download and don't really WANT to tackle a new version, even though the flashing red light is telling me to do so.
HansR did write a procedure for easy upgrading - see the locked post here if you think that might be useful to you.

I only upgrade my installation, when a new release offers something that brings me an advantage. To be brutal, the vast majority of functionality in MX is of absolutely no interest to me, but a few releases do fix bugs, or offer something new that is useful.

There is an option to turn that annoying red light off by editing the "Cumulus.ini" file. In theory, you can do it via the settings menu:
Settings -> Alarm Settings -> Upgrade Alarm -> Notify
but like me, you will then be annoyed further, because MX does not allow you to Upgrade Alarms i.e. save that setting change unless you have previously set settings required to send emails for alarms, just one of the MX design assumptions that apparently only annoys me ?
User avatar
mcrossley
Posts: 12765
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Host to PING on program start-up

Post by mcrossley »

sfws wrote: Tue 12 Apr 2022 5:36 pm In theory, you can do it via the settings menu:
Settings -> Alarm Settings -> Upgrade Alarm -> Notify
but like me, you will then be annoyed further, because MX does not allow you to Upgrade Alarms i.e. save that setting change unless you have previously set settings required to send emails for alarms, just one of the MX design assumptions that apparently only annoys me ?
Works for me? There is no dependency in the code for changing any of the alarm settings on anything else.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Host to PING on program start-up

Post by sfws »

mcrossley wrote: Sat 16 Apr 2022 4:27 pm There is no dependency in the code for changing any of the alarm settings on anything else
Unsure if you have understood what you quoted from my previous post, but you have certainly used poor logic in your 3.12.1 code edit.

The dependency I see, does not get shown when you untick the mentioned Enable box setting.

When I click the Upgrade Alarms button, instead of seeing "Saved settings" box, I get the dependency (on settings on another web page) error "ERROR: Invalid Alarm from email address entered". Please see lines starting at 424 as edited for 3.12.1 release at https://github.com/cumulusmx/CumulusMX/ ... ettings.cs
User avatar
mcrossley
Posts: 12765
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Host to PING on program start-up

Post by mcrossley »

OK, with you now, it's not that there is a dependency on the email for the upgrade alarm setting per se, but that you cannot save the settings page at all without setting an email address. That is a bug, I've just fixed it for the next release.

Because I have email details entered to test that functionality I never noticed that you couldn't have them.

Really, rather than fuming away to yourself about how terrible CMX is, it would be better to just report the problem and make me aware of it.
If you already have and I missed it I apologise, but I have limited hours to work on this.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Host to PING on program start-up

Post by sfws »

mcrossley wrote: Tue 19 Apr 2022 3:58 pm Because I have email details entered to test that functionality I never noticed that you couldn't have them.
I could see what I thought was a logic error in your coding in May 2021 when you introduced email facility in 3.11.0.
I assumed that when you did your alarm reworking and bug fixing in 3.11.2 you had checked your code, and had some reason for implementing that dependency as an intentional design feature. I was not to know how you did your testing, three decades ago when I was a manager arranging coding testing in an employment context, testing had to be specifically designed to test each condition put into coding, and so I naturally assumed your "hobby" testing was designed around your coding.
Thank you for now acknowledging it as a bug and fixing it for next release.
--------------------------------------------------------------------------------------------------
mcrossley wrote: Tue 19 Apr 2022 3:58 pm Really, rather than fuming away to yourself about how terrible CMX is,
...I have limited hours to work on this.
Obviously, I accept your "limited hours" may imply you don't fix anything that only bothers me.
I can easily find ways round some "issues" with CMX, and so it seems sensible to wait to see if anyone else is bothered.
It took 9 months for someone else to notice one such issue viewtopic.php?t=20227.

I highlighted in July 2021, difficulties in pleasing everyone with inter-dependencies between settings and given what you said back then, I resisted mentioning this specific dependency example as another issue then.
mcrossley wrote: Tue 19 Apr 2022 3:58 pm it would be better to just report the problem and make me aware of it.
I hoped someone else, not using email functionality, with better communication skills would raise the issue.
I find it very difficult to report such problems in a way that you understand, and this is a perfect example:
sfws wrote: Tue 12 Apr 2022 5:36 pmMX does not allow you to "Upgrade Alarms" i.e. save your settings change unless you have previously set settings required to send emails for alarms
That concisely expresses the problem, but was not understood by you.
mcrossley wrote: Sat 16 Apr 2022 4:27 pm Works for me?
(Maybe you were confused by earlier content).
I had to find time in my busy life to look up your code and expand the earlier quote to
sfws wrote: Sat 16 Apr 2022 7:38 pm When I click the Upgrade Alarms button, instead of seeing "Saved settings" box, I get the dependency (on settings on another web page) error "ERROR: Invalid Alarm from email address entered". Please see lines starting at 424
to gain your understanding.
Post Reply