Author Topic: Use ambientweather.net data for a Saratoga Template website...  (Read 12914 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9071
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Use ambientweather.net data for a Saratoga Template website...
« on: February 26, 2018, 07:00:19 PM »
If you purchased a weather station from Ambientweather.com AND have it reporting data to ambientweather.net AND would like to have a personal weather website, then there is good news:  the AWN-plugin for Saratoga templates is now available.

Note that if you have a device (e.g. Meteobridge) that is not a branded Ambient 'Weatherbridge' device, this plugin will not work for you without you paying a license fee to AmbientWeather.com to have your device macAddress listed.  That fee is currently $150.  If you did purchase your Weatherbridge (or other weather station) from Ambient, then the access is no charge.

What you need:
1) an account on https://ambientweather.net/
2) one (or more) weather stations reporting to ambientweather.net.  If you have more than one, you can only use ONE of the stations with the template.
3) an apiKey which is (during the beta API period issued by Ed@ambientweather.com) and after the API beta, issued on your account dashboard via a request button.

4) if you are currently using a Saratoga template with other weather software, just use the update tool with a query of Base-*,AWN-plugin, 26-Feb-2018 to get a .zip of the plugin.  Copy your existing Settings-weather.php to another name before replacing it with the one from the plugin.
Configure the Settings-weather.php using the AWN configuration page

5) if you have never installed a Saratoga template, then use the Template Download/Installation instructions page and set up a new website.

Be advised that new 'realtime' data is available from the API at 1 minute intervals, and the last 24hrs of data is updated every 5 minutes.  Also, you will need to run a cron job to capture 'yesterday' data for display on the ajax-dashboard.

You can see a running sample here with data from my Davis VP1+ system via Meteobridge.

I am looking to provide a socket.io based replacement AJAX JavaScript to enable even more 'realtime' data in the future -- the current implementation relies entirely on the REST API provided by ambientweather.net

Enjoy, and best regards,
Ken
« Last Edit: February 26, 2018, 07:02:46 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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9071
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Use ambientweather.net data for a Saratoga Template website...
« Reply #1 on: March 07, 2018, 03:29:59 PM »
I've updated the AWN-plugin to include a trends page and a graphs page (using Highcharts) for the last 24hrs of data.

Existing users can use the https://saratoga-weather.org/wxtemplates/updates.php update tool with a query for AWN-plugin, Base-*, 07-Mar-2018 to get the updates. Be sure to read the enclosed README file for directions.

Note that this initial version has some (but not all) the internationalization done. The Windrose will only display in MPH at this time. The Highcharts graphs will display in your template units, but the legends will all be in English.

A future update will correct those shortcomings.

Sample display at https://saratoga-weather.org/AWN/index.php

Enjoy.
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 dow

  • Senior Member
  • **
  • Posts: 62
  • Village Idiot in training
Re: Use ambientweather.net data for a Saratoga Template website...
« Reply #2 on: October 26, 2018, 01:45:40 PM »
Hi,

I've got a wordpress site that I'm using to display the WU forecast for my PWS.  I know that wordpress uses PHP, and have checked that your test php script will work for me.  Can I insert your other scripts without completely hosing my wordpress installation?  If so, can you direct me to a tutorial that will assist me with this?

Thanks!
dow
https://www.pwsweather.com/station/pws/ktxboern48
Dow Mathis ∴
Boerne, TX
Nothing is foolproof to a sufficiently motivated fool.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9071
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Use ambientweather.net data for a Saratoga Template website...
« Reply #3 on: October 26, 2018, 02:20:31 PM »
Ahh.. what you ask for is definitely non-trivial.  The AWN plugin is designed to work within a Saratoga template set, and not for standalone use.  WordPress requires a separate plugin to execute native PHP code.

I strongly suggest you look at https://weather.station.software/ which is a WordPress plugin that can access Ambientweather.net for data, and provides shortcodes for you to embed your weather data in posts and pages.  It would be a LOT less effort than trying to use the Saratoga AWN-plugin with WordPress (or any other CMS like Joomla or Drupal).

Some of my other scripts (for forecasts, etc) can work inside a WordPress installation, but you'll need a WordPress plugin to enable native PHP code to work within WordPress posts/pages.
« Last Edit: October 26, 2018, 02:22:26 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

 

anything