Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Webtags API how to

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
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Webtags API how to

Post 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
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Webtags API how to

Post 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.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Webtags API how to

Post 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?
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Webtags API how to

Post 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.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Webtags API how to

Post 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.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Webtags API how to

Post by HansR »

Thanks. Fair enough.
Switch to POST it is...
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
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: Webtags API how to

Post by sfws »

You may want to see Mark's examples here
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Webtags API how to

Post 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.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Webtags API how to

Post 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:
  1. To be able to see WLL receptionn statistics you need to have a Pro(+) subscription
  2. 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)
  3. the WLL statistics are updated 4 times per hr hh:01, hh:16, hh:31 and hh:46
  4. For a Davis VP you can switch off the reception stats in the settings (reflected in the parameter DavisReadReceptionStats) for the WLL you cannot
  5. 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 :D
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Webtags API how to

Post 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
You do not have the required permissions to view the files attached to this post.
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Webtags API how to

Post 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 :lol:
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Post Reply