Author Topic: WXLink: A Lightweight WordPress Plugin for Displaying Davis WeatherLink Data  (Read 1418 times)

0 Members and 1 Guest are viewing this topic.

Offline wx2000

  • Member
  • *
  • Posts: 2
Hi everyone — I’m not a developer by trade, just a weather and AV enthusiast who needed a simple way to display data from my Davis WeatherLink station on a WordPress site. Not finding exactly what I needed, I built a plugin to solve that and thought I'd share it with all of you--for free.





What it does:
WXLink connects to the WeatherLink v2 API and displays key station data—temperature, highs/lows, wind, gusts, humidity, rain totals, pressure, and more—on your WordPress site in a clean, responsive layout. It uses PHP, caching, and no heavy dependencies. It’s free, has no tracking or branding—not even a header. Just your data on your site, with a flexible layout and a few settings to help you style and install it quickly.

Why I made it:
Many station owners just want a simple, reliable way to get back to the basics: observing and sharing their weather data with their community. This free tool helps do exactly that—display your data on your own website, without relying on third-party widgets that may not match your site’s look or feel.

Link to the Plugin & Screenshots/More Info:
https://theavcoach.com/wxlink-plugin/

Enjoy!  Hopefully it’s helpful!



Offline JesseLikesWeather

  • Senior Contributor
  • ****
  • Posts: 188
  • Jesus is LORD
    • Milton Weather Ranch
I don't operate a Davis Weather Station, but I find your plugin quite interesting, nice and simple. Good work, keep it up!
JesseLikesWeather

Advanced Weather Enthusiast

Hurricane Season is here, track it: https://jessewx2011.github.io/Milton-Weather-Page/storms.html

Ambient WS-2000 Weather station Operator



Offline beren

  • Member
  • *
  • Posts: 9
    • Tarn Aeluin
Cool - will you be keeping this up to date with Wordpress updates? Definitely woudl suggest adding to their pulgin distribution system so that users can see if it is compatible with the next Wordpress release.

beren

Offline wx2000

  • Member
  • *
  • Posts: 2
Thanks so much — I really appreciate you thinking that highly of the plugin! I’ve definitely considered submitting it to the WordPress plugin repository so others can more easily track compatibility and updates. That said, I’m not a developer by trade, so I’ve been cautious about navigating the official requirements and coding standards just yet.

I do use the plugin myself, so as long as I rely on it, I’ll absolutely be keeping it updated if any WordPress changes ever cause it to stop working.  [tup]

Offline beren

  • Member
  • *
  • Posts: 9
    • Tarn Aeluin
Actually I am software engineer with ~30 years of experience.I have not done WP development for a long time, but I checked out your code. Looks pretty good to me. Some minor formatting issues. Not sure what development environment you are using. I use MS Visual Studio Code with the recommended PHP extensions: PHP Intelephense and PHP Debug. Jetbrains PHP Storm Community is a good one too. Both are free.  [tup]

One suggestion would be to look at a plugin from Auttomatic to see how they do things. A good one is the akismet plugin, which is supplied by default in a base Wordpress install. Checkout their header and how they incorporate things like the license information. I don't think you need to break up your plugin into multiple files like they have unless it gets a lot bigger in terms of functionality.

Another suggestion would be to manage your code on github.com so that if problems did arise, uses could post issues or feature suggestions there. Or you could have other "volunteers" help maintain this or extend this.

I have a public Wordpress blog that I'll install this on and see how things go.

beren

Offline beren

  • Member
  • *
  • Posts: 9
    • Tarn Aeluin
Ok - I gave a it a shot - couple of suggestions:

1. You have this hardcoded to a vantage view pro 2 wireless (sensor type 43). I have the Vantage Vue Wireless (sensor type 37), so the plugin does not work for me. You could add a setting to allow someone to say what type of ISS they have, but then you would also need to start building out the code to parse the various data structures. Maybe that is more than you want to deal with.

2. I would be cool to have an actual side-bar widget where you could have the ability to pick what weather data to show.

Just ideas/suggestions.

Also - I see Davis is still recommending Postman. If you are using that I would stop and use Bruno instead. Postman stores your keys and secrets in their cloud - not cool. https://www.usebruno.com/

beren

Online mcrossley

  • Forecaster
  • *****
  • Posts: 1278
    • Wilmslow Astro
Caveat, I haven't looked at the code...

There are so many possible different ISS sensor types, it may be better to decode based on the data structure type for current data, there are only a few of those
There are wireless and wired variations of each of the station types VP2, Vue, WLL, and WLC.

Then there are all the different sensor types for the console data that includes the pressure - there are a few of those.

The Davis v2 API is a bit of beast to generalise.
Mark

Offline beren

  • Member
  • *
  • Posts: 9
    • Tarn Aeluin
Do all weather stations use data structure #23? If so, then yes this would be the way to go.

Online mcrossley

  • Forecaster
  • *****
  • Posts: 1278
    • Wilmslow Astro
No, for current data the data types are:

VP2/Vue uses 1 or 2 depending on firmware version for both wired/wireless ISS

WLL uses 10 for both wired/wireless ISS
WLC uses 23 for both wired/wireless ISS

The good news is that the sub-set of values you will want to use in data types 1 & 2 is the same, similarly for data types 10 & 23. So you can get away with handling just two data types if you define them using the two common sub-sets of fields.

Then for pressure I use the sensor type 242 which is used for both the WLL and WLC barometer data.

The VP2/Vue baro data is in the data structure types 1 & 2 that contains all the other current data above.
Mark

Online johnd

  • Forecaster
  • *****
  • Posts: 5132
    • www.weatherstations.co.uk
Do all weather stations use data structure #23? If so, then yes this would be the way to go.

No. Full details at https://weatherlink.github.io/v2-api/ , but you probably know that already. Exactly which data structure is used depends on several factors such as the upload device type. But for common hobbyist stations the data structures will be pretty similar. But anyone using a Davis EM station for example may see significant differences.

Edit: Sorry Mark, in a rush and didn’t notice your previous replies. so my post probably redundant.
« Last Edit: June 14, 2025, 06:31:01 PM by johnd »
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

 

anything