Author Topic: Switch from WView to Weewx and Template....  (Read 429 times)

0 Members and 1 Guest are viewing this topic.

Offline bassemolufda

  • Member
  • *
  • Posts: 3
Switch from WView to Weewx and Template....
« on: August 26, 2024, 03:37:53 PM »
I used the WVIEW software before. Now I use the WEEWX software. I installed the plugin for WEEWX weewx-saratoga-main. A WEEWXtags.php is created by WEEWX.

Now I would like to have this data entered into my weather page. Unfortunately, that doesn't work.

In wview: <?php print $WX['outsideTemp']; ?> the temperature was entered with this parameter.

What parameter do I have to use in the template for WEEWX? Unfortunately, the page https://saratoga-weather.org/wxtemplates/maint.php doesn't show me a solution.

Can someone please help me?

Regards Uwe

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9538
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Switch from WView to Weewx and Template....
« Reply #1 on: August 26, 2024, 08:15:31 PM »
The weewx-saratoga skin for weewx creates and uploads a WEEWXtags.php (just like Weather-Display testtags.php).  There are no $WX[...] tags, just named $tags.

Use http://your.website.com/WEEWXtags.php?sce=view to see the list of what tags are available on your site.
« Last Edit: August 26, 2024, 08:21:36 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline bassemolufda

  • Member
  • *
  • Posts: 3
Re: Switch from WView to Weewx and Template....
« Reply #2 on: August 26, 2024, 10:56:23 PM »
Thank you for the tip. That helped me a little. But it means that I now have to completely reprogram the entire homepage with the new tags.... Is there no other solution?

Sincelery Uwe

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9538
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Switch from WView to Weewx and Template....
« Reply #3 on: August 26, 2024, 11:20:05 PM »
Alas, no .. with Weather-Display or weewx-saratoga, the variables only exist in $tagname format.

But.. all the other plugins which use a [name]-defs.php to convert [name]tags.php entries into $tagname format that is used natively throughout the Saratoga template set.  So your one-time conversion to $tagname from $WX['tag'] format would work if you switch to yet another weather software in the future.

For ease of switching weather software, I recommend not using the $WX[] tags as the names are unique with each weather software -- use the $tagname variables instead to add custom pages with markups.  The ajax-dashboard and ajax-gizmo both have examples of using the $tagname format for common weather variables.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything