Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.4.0 (build 3064) - 19 February 2020.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    Custom Http Call

    Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

    Moderator: mcrossley

    Post Reply
    water01
    Posts: 1593
    Joined: Sat 13 Aug 2011 9:33 am
    Weather Station: WH1081
    Operating System: Windows 10 64bit
    Location: Burnham-on-Sea
    Contact:

    Custom Http Call

    Post by water01 » Tue 11 Feb 2020 12:31 am

    I saw this included "at rollover" and didn't read the following bit properly, and just assumed that I could FTP a file "At End of Day" and then use the at Rollover function to run the Import process to my database.

    Did NOT notice those words saying "just before"!! Any chance of there being a "5 mins after option"?
    David
    Image

    User avatar
    beteljuice
    Posts: 2821
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Custom Http Call

    Post by beteljuice » Tue 11 Feb 2020 12:41 am

    Just before is "end of day" isn't it ?
    Image
    ......................Imagine, what you will KNOW tomorrow !

    User avatar
    HansR
    Posts: 532
    Joined: Sat 20 Oct 2012 6:53 am
    Weather Station: Davis Vantage Pro 2+
    Operating System: Raspbian GNU/Linux 10 (Buster)
    Location: Wagenborgen (NL)
    Contact:

    Re: Custom Http Call

    Post by HansR » Tue 11 Feb 2020 6:05 am

    A free to define nr of minutes after rollover would be nice. Not only for custom http but also for run of external program..
    https://meteo-wagenborgen.nl / Cumulus (3.3.0 b3063)
    Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
    Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
    Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

    User avatar
    PaulMy
    Posts: 2046
    Joined: Sun 28 Sep 2008 11:54 pm
    Weather Station: Davis Vantage Pro 2+ w/Envoy USB
    Operating System: Windows-8
    Location: Komoka, ON Canada
    Contact:

    Re: Custom Http Call

    Post by PaulMy » Tue 11 Feb 2020 5:09 pm

    David, would using the Minutes interval be feasible? i.e. 1440 set at 00:05
    I haven't tried it and not sure what the maximum minutes, or seconds, are.

    Enjoy,
    Paul

    Mapantz
    Posts: 658
    Joined: Sat 17 Dec 2011 11:55 am
    Weather Station: Davis Vantage Pro2
    Operating System: Windows 10 x64
    Location: Dorset - UK
    Contact:

    Re: Custom Http Call

    Post by Mapantz » Tue 11 Feb 2020 9:52 pm

    PaulMy wrote:
    Tue 11 Feb 2020 5:09 pm
    David, would using the Minutes interval be feasible? i.e. 1440 set at 00:05
    I haven't tried it and not sure what the maximum minutes, or seconds, are.

    Enjoy,
    Paul
    I'm not sure it works like that.

    You could manage it once by putting in 1441 and hitting save right at the stroke of midnight, but it'll not work again if CMX has to be restarted. :lol:
    Image

    User avatar
    mcrossley
    Posts: 5997
    Joined: Thu 07 Jan 2010 9:44 pm
    Weather Station: Davis VP2
    Operating System: Stretch Lite rPi
    Location: Wilmslow, Cheshire, UK
    Contact:

    Re: Custom Http Call

    Post by mcrossley » Wed 12 Feb 2020 1:58 pm

    Be aware that the extra files are processed (and copied) during the day reset, but will not be FTP'd until the next FTP interval, which is asynchronous to the day reset.

    The best way of doing stuff like this is to take control of it yourself...

    The "external program" is called at the end of day reset processing (but before the end of day extra files processing - hmm, maybe that should change). I'd use that to call a script to do whatever you want, that could include a 5/10 minute delay at the start if you wish.

    For instance I use it to run a database export and then backup the Cumulus data files, the dB export, and my web site to an external server.

    User avatar
    HansR
    Posts: 532
    Joined: Sat 20 Oct 2012 6:53 am
    Weather Station: Davis Vantage Pro 2+
    Operating System: Raspbian GNU/Linux 10 (Buster)
    Location: Wagenborgen (NL)
    Contact:

    Re: Custom Http Call

    Post by HansR » Wed 12 Feb 2020 2:12 pm

    mcrossley wrote:
    Wed 12 Feb 2020 1:58 pm
    The "external program" is called at the end of day reset processing (but before the end of day extra files processing - hmm, maybe that should change). I'd use that to call a script to do whatever you want, that could include a 5/10 minute delay at the start if you wish.
    Not sure if the reversal of the "external program" and the "end of day extra files processing" would be a good idea. If the external program creates a file which should be processed, reversal would mean the processing would only take place a whole cycle later. That's probably not intended by the user.

    NOTE: that is already taking place at the 'FTP' cycle (the NOT daily and NOT realtime cycle). The uploaded processed file is produced one cycle before.
    https://meteo-wagenborgen.nl / Cumulus (3.3.0 b3063)
    Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
    Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
    Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

    User avatar
    mcrossley
    Posts: 5997
    Joined: Thu 07 Jan 2010 9:44 pm
    Weather Station: Davis VP2
    Operating System: Stretch Lite rPi
    Location: Wilmslow, Cheshire, UK
    Contact:

    Re: Custom Http Call

    Post by mcrossley » Wed 12 Feb 2020 2:16 pm

    HansR wrote:
    Wed 12 Feb 2020 2:12 pm
    Not sure if the reversal of the "external program" and the "end of day extra files processing" would be a good idea. If the external program creates a file which should be processed, reversal would mean the processing would only take place a whole cycle later. That's probably not intended by the user.
    Agreed, there are use cases for having it either way around. But it's been that way round forever, so it stays that way.

    Post Reply