Page 1 of 1
Generate clientraw.txt
Posted: Tue 22 Nov 2022 10:07 am
by The Dalek Hunter
Is there anyway to get CMX to generate a clientraw.txt?
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 10:25 am
by broadstairs
Perhaps an explanation as to why you need this would be helpful.
Stuart
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 10:36 am
by The Dalek Hunter
I have several weather related websites one of which is here
https://wx-watch.co.uk/pws/index.php
At the moment the current conditions is being generated via METAR but the nearest airport to me is 40 miles away so not accurate.
It can generate a current conditions using a clienraw files generated by a weather station.
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 10:50 am
by mcrossley
What is clientraw.txt, and where is the content defined?
It sounds like a Weather Display output file?
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 10:53 am
by broadstairs
I use the Saratoga template (modified a bit) to generate my CMX website and it uses a plugin from Ken True to convert CMX web tags to those used by Weather Display it is called CU-defs.php and using that I was able to get CMX updating a copy of my Weather Display website. Maybe you could use this instead.
You can see and compare at
https://www.stella-maris.org.uk/CumulusMX/wx.phtml
and
https://www.stella-maris.org.uk/wx.phtml
Stuart
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 11:01 am
by broadstairs
mcrossley wrote: ↑Tue 22 Nov 2022 10:50 am
What is clientraw.txt, and where is the content defined?
It sounds like a Weather Display output file?
Yes Mark it is and see my comments above.
Stuart
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 12:36 pm
by mcrossley
Having had a look at the format (thanks Stuart), it will not currently be possible to replicate the clientraw file in CMX.
I had thought you may be able to use a custom file with web tags, but clientraw uses fixed units such as knots for wind speed, hPa for pressure etc. So unless you happen to use those same units the web tags mechanism is a non-starter.
Re: Generate clientraw.txt
Posted: Tue 22 Nov 2022 3:18 pm
by The Dalek Hunter
Ok - many thanks
Re: Generate clientraw.txt
Posted: Thu 24 Nov 2022 10:09 am
by Gyvate
In my opinion it should work - in principle.
As long as the webtags (including the necessary unit converters) for the clientraw.txt file are available in CMX, you can have CMX create that file.
You need to create a template file e.g. named clientrawT.txt and place it in the ...\CumulusMX or .../CumulusMX directory and
activate the file and - if needed - ftp send options in Settings --> Extra web files.
The content of clientraw.txt will then be created by CMX and - if tagged - posted via ftp to your website.
The content of your clientrawT.txt file would be:
<#webtag1> <#webtag2> ...... <#webtagn>
just the webtags separated by a space/blank.
And the sequence of the webtags is defined by what you want the clientraw.txt file content to look like.
You only want to create the file and process it otherwise - do not tag the FTP option in Settings --> Extra web files
Another approach, if the needed unit conversion for the webtags is not available, could be to define the units in CMX exactly the way the clientraw.txt file expects if that's possible.
Re: Generate clientraw.txt
Posted: Thu 24 Nov 2022 9:38 pm
by BCJKiwi
Hi,
I use these files to drive my Saratoga site from CMX
Place this file in the main website folder
CU-defs.zip
Place these in the CumulusMX/web folder and add the output to extra web files.
CUtags_SrtgT.zip
output to Saratoga as CUtags.php
realtimetags_SrtgT.zip
output to Saratoga as realtimetags.php
Change the generated file names to your preference.
When using the realtime files I prefix the regular var name with $RT- to make it clear which variable are being supplied by realtimetags_Srtg.php