[XTension] Davis Weatherlink JSON connection

John Sievert johnsievert at me.com
Thu Dec 21 14:53:13 EST 2023


Well, I’ve been pretty busy.

I’ve just spend a ton of time over the last 60 days  moving my whole home automation system over to an M1 mac mini and then updating system software to most current Apple systems.

In the process, I’ve moved all my X10 devices (surprising number of them remaining, around 30 or so) since they’ve started failing after 20 years and replacing them with Z-wave devices, removed my W800 and switched most of my motion detectors from X10 to Zigbee, moved off of the Vera I had been using and switched to a new Hubitat interface.

I’ve also replaced my sprinkler controller from an X10 version to a Zooz relay based device so it’s all z-wave too. My sprinkler control is determined by information from my weather station which looks at soil moisture and wind.

So now the last remaining big thing I have to do is get my Davis Vantage Pro2 weather station changed from the AppleScript interface from Dean Davis’ excellent WeatherTracker (which is no longer supported) to something else.  WeatherTracker now needs the latest version of Rosetta to run on the M1 macs and its reliability is declining.  I had to make provisions to kill it and restart it under XT control as it tends to freeze on the latest macOS.  So I need to get onto something more modern, but I still need all that soil moisture data, temperatures, etc…. to make a lot of other decision in my system.  That means I need to figure out how to manage the JSON connection to the weather station.

Davis has a complex JSON interface to the weather station located on my local network (their “V1” api).  I’ve been fooling around with the LoadURL stuff and the Parse Json commands.  I can see that I’m getting a couple of records back, but I can’t for the life of me read any of the data.  I’m sure it’s an issue buried deep in the record syntax of AppleScript and my coding of it.

I’ve been looking at doing this perhaps in Python which has some pretty robust tools for JSON.  Getting that data into Xtension is what I’m hung up on now and pretty much dead in the water.

So, a couple of questions:

1. Has anyone gone through this effort yet of connecting to a Davis Weather Station with JSON?
2. Is there an easy or straightforward way to get this done with python and interface it to Xtension?

TIA.

John

--
"You can't believe everything you see on the Internet" - Abraham Lincoln
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://machomeautomation.com/pipermail/xtensionlist_machomeautomation.com/attachments/20231221/dd3811b9/attachment.htm>


More information about the XtensionList mailing list