Page 1 of 1
Webtags API how to
Posted: Mon 25 Apr 2022 1:59 pm
by HansR
I am building my API string for webtags and then put the question out via a HttpClient instance. It worked fine for webtags without parameters but it seems that parameters to the webtag like
channel and/or
tx do not get interpreted and I get no value back.
The URL is:
Code: Select all
http://localhost:8998/api/tags/process.json?DavisTotalPacketsReceived&DavisTotalPacketsMissed&DavisMaxInARow&DavisNumCRCerrors&DavisFirmwareVersion&DavisNumberOfResynchs&battery&txbattery channel=1&DavisReceptionPercent tx=1&DavisTxRssi tx=0&DavisTxRssi tx=1
The
example quoted in
the wiki does not give me enough clues (or I just missed them). Do I have to quote the tx=1 parameter to the webtag? Or do I have to quote the whole thing e.g. "DavisReceptionPercent tx=1"
NOTE: I don't have a WLL myself so I asked some to test
Re: Webtags API how to
Posted: Mon 25 Apr 2022 3:02 pm
by mcrossley
If you want to use parameters you need to do a POST rather than a GET, and put your tags in the request body.
Re: Webtags API how to
Posted: Mon 25 Apr 2022 3:04 pm
by mcrossley
Sorry, that is pretty much what that linked post you gave says - just with more details!
What is you need to get started?
Re: Webtags API how to
Posted: Mon 25 Apr 2022 3:13 pm
by HansR
Ha... I already shouted that that was not funny
OK, I need the WLL statistics and I used to build a URL for the DAVIS stats, now I need some of them per channel / transmitter. So I tried to ask them with the URL in the first post. Specifically I need per Tx:
txbattery channel={tx}";
DavisReceptionPercent tx={tx}
DavisTxRssi tx={tx}
DavisTxRssi tx={tx}
where tx is the value of the channel.
If this must be done by post I can do it as well but the handling will be much different.
But then I think I better skip the get completely.
If you think that's better than I'll switch to post.
Re: Webtags API how to
Posted: Mon 25 Apr 2022 3:38 pm
by mcrossley
The GET I see as quick and convenient, but not flexible. The POST as more powerful, you can structure the request with whatever parameters you require, and format it as JSON, XML, CSV... whatever you want to consume.
Re: Webtags API how to
Posted: Mon 25 Apr 2022 3:56 pm
by HansR
Thanks. Fair enough.
Switch to POST it is...
Re: Webtags API how to
Posted: Mon 25 Apr 2022 4:44 pm
by sfws
You may want to see Mark's examples
here
Re: Webtags API how to
Posted: Mon 25 Apr 2022 4:51 pm
by HansR
@sfws: thanks but been there, done that. I use both get and post technique, just thought the modifying parameters could be used with the get construction as well.
Re: Webtags API how to
Posted: Thu 28 Apr 2022 9:03 am
by HansR
Although a lot of info has been exchanged behing the curtain in emails with Mark, I would like to note additional info from that conversation which may be useful to other Davis users:
- To be able to see WLL receptionn statistics you need to have a Pro(+) subscription
- Davis considers -90 a cutoff value for the reception of values from the WLL so look for a value as high as possible (sounds logical)
- the WLL statistics are updated 4 times per hr hh:01, hh:16, hh:31 and hh:46
- For a Davis VP you can switch off the reception stats in the settings (reflected in the parameter DavisReadReceptionStats) for the WLL you cannot
- The Davis VP stops reading data when reading stats. The WLL does not, it is done in parallel (not sure the WLL is multiprocessor though but what the hell, everything is these days isn't it)
Well, have fun with it.
Oh and for Cutils the WLL statistics have now been implemented for the next release

Re: Webtags API how to
Posted: Fri 29 Apr 2022 4:13 pm
by PaulMy
Hi Hans,
To be able to see WLL reception statistics you need to have a Pro(+) subscription
From my first reading, I think need to clarify that perhaps you were indication that either a Pro
or the Pro+ account is needed for the WLL reception statistics, not only the Pro+ account.
I have the Pro and the Health Data is available with this.
Enjoy,
Paul
Re: Webtags API how to
Posted: Fri 29 Apr 2022 4:34 pm
by HansR
OK, Thanks Paul.
I think you are right about the intention of that writing but I don't do Davis anymore so I don't know the difference between Pro and Pro+.
I just copied what Mark wrote in his mail
