Author Topic: How does weewx process Davis loop packets?  (Read 3828 times)

0 Members and 1 Guest are viewing this topic.

Offline johnd

  • Forecaster
  • *****
  • Posts: 4849
    • www.weatherstations.co.uk
How does weewx process Davis loop packets?
« on: April 22, 2014, 12:14:08 PM »
Asked this on the weewx users forum but slow to get an answer. Does anyone here know the answer please?

What does weewx do with the LOOP records it requests from a Davis station? Do they get processed for the weewx archive database at all? Or are archive downloads the sole data feed for the archive database?

Is this described somewhere in the weewx documentation and I've just overlooked it? If so could someone kindly point me in the right direction please?
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.

Offline NWOGoingOffGrid

  • Member
  • *
  • Posts: 1
Re: How does weewx process Davis loop packets?
« Reply #1 on: January 14, 2017, 11:07:16 AM »
I'm interested in this as well. I have a phant server that is collecting the raw data from my particle photon based weather station and then wrote a Python script to do a jsonp query from that server with a cron job every minute. The format of the data coming from my phant server (JSON) looks a lot like a loop packet. What I do now with my script is to deconstruct the JSON packet from my server and parse it into label=value pairs and save to a text file for fileparse.py to then reconstruct as a loop packet. Wondering if I can skip this step and import the JSON packet or dict directly into weewx with a custom driver. Anyone have any ideas?

Sent from my Nexus 6 using Tapatalk

Offline mwall

  • Contributor
  • ***
  • Posts: 135
Re: How does weewx process Davis loop packets?
« Reply #2 on: January 14, 2017, 11:54:25 AM »
since you are already collecting data from the weather station in python, it should be simple for you to turn that python code into a weewx driver.

take a look at the fileparse driver that ships with weewx.  instead of reading from file, substitute the code that you are already using to read from the hardware.  instead of emitting json, you simply add to a dict the observations as named elements.

the fileparse driver is packaged as an extension, i.e., it has a readme, changelog, install.py as well as the fileparse.py driver itself.  you only need to do that packaging if you want to distribute your driver in an easy-to-use package.

see the weewx customization guide for details:

http://weewx.com/docs/customizing.htm#porting

see the weewx wiki for many other driver examples:

https://github.com/weewx/weewx/wiki#drivers

m

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: How does weewx process Davis loop packets?
« Reply #3 on: January 15, 2017, 12:32:42 AM »
Quote
from my particle photon based weather station
as in photo resisters etc for the wind speed and direction?