Page 1 of 1

third party http upload - unexpected behavio(u)r

Posted: Sun 20 Mar 2022 10:14 am
by Gyvate
over the past weeks I noticed double postings by two of my CMX instances - sent to the same web site.
of course only one was supposed to be posted, but CMX didn't behave as (by common sense I think) expected:

instance 1: in the by minute field the URL was entered, "enabled" was tagged and the page saved
result: the posting worked

I switched the posting to instance 2:
I untagged the "enabled" box in instance 1 and saved (the URL was still in the field - and why not - so I thought)
instance 2: in the by minute seconds field the URL was entered, "enabled" was tagged and the page saved
result: the posting worked
HOWEVER - instance 1 kept on posting even though the "enabled" was untagged

after the saving, each time the respective instance was restarted

The only way I got it stop was doing the following steps:
- tag enabled
- field cleared of URL, saved
not enough
in addition
- tag disabled (untaged) with empty URL field
- saved
only then it would stop posting - otherwise the URL was not removed from Cumulus.ini and the posts were done again after a restart even though the option was untagged

Now I know what to do, but isn't that behaviour somewhat misleading ?

My expectation was (still is) that I can have a URL in the field and the "enabled" untagged and it wouldn't post. Like this I can disable the post without losing the URL (which can be a very long string of sensor data) and re-enable it by just tagging it again - otherwise, what's the point of the "enabled" field to be tagged/untagged if the untag doesn't work ?
untagging and saving alone won't do the job ... :? - For enabling tagging, putting URL and save works ...
EDIT: changed minute to seconds as that was the field in question

Re: third party http upload - unexpected behavio(u)r

Posted: Sun 20 Mar 2022 4:47 pm
by mcrossley
Hmm, I had a look at the code and could not see a problem, and tried to reproduce this and failed.

The only bit that isn't quite working correctly is the disable of the Seconds HTTP.
That currently requires a restart of CMX.

The rest: enable seconds, enable/disable the Minutes HTTP work OK.

The logic in the code is simple, the Minute calls are contained with an IF that checks the enabled flag.

The Seconds enables or disables a timer based on the enabled flag - bar the issue that it did not disable it without a restart - now fixed.

Re: third party http upload - unexpected behavio(u)r

Posted: Sun 20 Mar 2022 5:36 pm
by Gyvate
:clap: - it was in fact the disabling (untagging of selection) of the seconds field - I corrected/edited my earlier post correspondingly.