Weather Station Hardware => Ambient Weather and Ecowitt and other Fine Offset clones => Topic started by: saratogaWX on February 26, 2018, 07:00:19 PM

Title: Use ambientweather.net data for a Saratoga Template website...
Post by: saratogaWX 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 (https://dashboard.ambientweather.net/account) via a request button.

4) if you are currently using a Saratoga template with other weather software, just use the update tool (https://saratoga-weather.org/wxtemplates/updates.php) 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 (https://saratoga-weather.org/wxtemplates/Settings-config-AWN.php)

5) if you have never installed a Saratoga template, then use the Template Download/Installation instructions page (https://saratoga-weather.org/wxtemplates/install.php) 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 (https://saratoga-weather.org/AWN/wxindex.php) 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,
Title: Re: Use ambientweather.net data for a Saratoga Template website...
Post by: saratogaWX 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

Title: Re: Use ambientweather.net data for a Saratoga Template website...
Post by: dow on October 26, 2018, 01:45:40 PM

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?

Title: Re: Use ambientweather.net data for a Saratoga Template website...
Post by: saratogaWX 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.