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

Local webtags

Share your Cumulus MX user interface here

Moderator: mcrossley

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

Local webtags

Post by Mapantz »

I made my own web page specifically for a tablet, but now I want to convert it to read the data locally..

Is there a list of all of the local webtags?

I've been using:

Code: Select all

<span id="WindLatest">
etc

I'm trying to get the cloudbase, moon phase/percentage, lightning data and leaf wetness.
Image
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Local webtags

Post by HansR »

Interesting question but I don't understand it.
What do you mean by 'read the data locally' in the context of a webpage (irrelevant being displayed on a laptop or a tablet or phone).
What do you mean by local webtags?
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Mapantz
Posts: 1822
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Local webtags

Post by Mapantz »

The exact same way that the index.html and now.html from the local interface gets the data. I've gotten most of it, but I don't know the names of the ID's for the extra data I wanted to add, as per my first post.
Image
water01
Posts: 3258
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Local webtags

Post by water01 »

Couldn't you just set up a file with all the webtags you want and add it to the Extra Web Files area and make it's destination a local file area i.e. C:\CumulusMXTags and set the process file indicator.

That way it will process the file and copy the file locally.
David
Image
Mapantz
Posts: 1822
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Local webtags

Post by Mapantz »

I could've done, but why spend time doing that when the data can already be grabbed?

I've got my local page working by using the same method as the index.html and now.html. However, I am missing a few bits of data and I don't know the ID's

I am talking about CMX's local interface here, not a global website.
Image
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Local webtags

Post by HansR »

OK. So I assume those tags are different from the regular Webtags.
What you are looking for is not published afaik, so you either aks Mark or study the interface well.
I assume...

[EDIT]: the word webtag or tag in this case is a bit troublesome I think. You are looking for the id's if I understand you well.
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: Local webtags

Post by sfws »

Just as an aside, this is more evidence that the Cumulus 1 terminology "webtags" continues to generate much confusion in a MX context.
Mapantz wrote: Mon 26 Sep 2022 1:19 pm I made my own web page specifically for a tablet, but now I want to convert it to read the data locally...

Is there a list of all of the local webtags?
Please see Mark's documentation indexed as predetermined data here.
Mapantz wrote: Mon 26 Sep 2022 3:42 pm The exact same way that the index.html and now.html from the local interface gets the data
In other words that you wish to use the web server that MX itself generates on port 8998, (not a server that you host yourself).
Mapantz wrote: Mon 26 Sep 2022 1:19 pm I'm trying to get the cloudbase, moon phase/percentage, lightning data and leaf wetness.
If this data does not already exist in standard local interface, then I believe you have to use a General API that you write yourself as Mark's documentation describes.
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Local webtags

Post by HansR »

sfws wrote: Mon 26 Sep 2022 4:59 pm Just as an aside, this is more evidence that the Cumulus 1 terminology "webtags" continues to generate much confusion in a MX context.
As an aside to an aside: it is not the terminology which creates confusion, it is the misunderstanding of what it is.
That is a big difference. What's in a name etc...

Never try to solve a problem by using other names. That is called newspeak.
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: Local webtags

Post by sfws »

@Mapantz: I perhaps should have mentioned, if you view (in developer tools/options for your browser) the Network tab, and then click on the JSON data file, you can see the available data item names such as "WindLatest". The fact that these abbreviated names match a subset of web tag names should be interpreted as being intended purely to make it easier to understand what the data represents.

@HansR: My aside was included in reaction to her associating a HTML id with the Cumulus 1 concept of a web tag. After I read your post timed before mine, you added an edit, where you also suggest webtag not being appropriate terminology for an id, proving you do understand my point.
The confusion for a lot of Cumulus MX users, stems from the developer choosing to use the well understood Cumulus 1 terminology (rather than a new label) to cover the very different Cumulus MX Local API context (and other contexts where the terminology is used, MQTT etc.) without explaining how the data available varies in his different uses of that terminology.
Some decades ago when I was in paid work, the frequently changing bosses each inflicted re-branding, (well established projects or departments were given new names, or new logos, without changes to the actual work we workers did), that attitude was an example of your newspeak!
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Local webtags

Post by HansR »

@sfws: to fill HTML elements with an id with value requires programming, most likely but not necessarily in javascript. That and the fact that an id is definitely different from the webtag identification, even if there is an overlap, is in itself not an argument to change the word for the entities we know now as Webtags.

Mapantz could have used any ID by any other name (sic) for the HTML element and did not mention anyhow she was going to fill that element so using the term Webtag for the ID is bad practice according to me.

Beside that to be precise: I did not say the word webtag was inappropriate, I said it was a bit troublesome. That is different.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Local webtags

Post by HansR »

And btw @sfws newspeak is not mine, it is Orwell's.
Don't think too much of my use of that word ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12776
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Local webtags

Post by mcrossley »

To go back to what I think was the original question. If I understand it correctly you want a list of the "ids" used/available on the main dashboard page?

This is provided anywhere at the moment. But you can get the current data yourself....
- Load the dashboard page in your broswer
- Start the dev tools - F12 for Chromium based browsers
- Refresh the the page
- Look in the dev tools network tab and find the Name = "ws" entry, select that and select the Messages tab
- That shows the data being sent from CMX

You can copy the data from one message (they are all the same) and reformat it in a decent editor (it is JSON format), and you should be able to see all the ids. Or you can just browse the formatted data in the dev tools.
Mapantz
Posts: 1822
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Local webtags

Post by Mapantz »

Thank you for the replies. Most helpful!

I am going to create a small JSON and read that data.

Quick question; Can dp=1 used when calling the API?

ie

Code: Select all

MoonPercentAbs dp=1
Image
User avatar
mcrossley
Posts: 12776
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Local webtags

Post by mcrossley »

You can, but you have to use the POST method to add tag parameters.
Post Reply