Skip to content

Communication tools for the Davis VantagePro2 devices.

License

Notifications You must be signed in to change notification settings

OStubbs/PyVantagePro

This branch is 22 commits ahead of LionelDarras/PyVantagePro:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 7, 2023
9311479 · Nov 7, 2023
Nov 7, 2023
Nov 7, 2023
Nov 7, 2013
Nov 7, 2023
Nov 7, 2023
Nov 7, 2023
Nov 7, 2023
May 17, 2012
Jun 17, 2012
Nov 7, 2023
Nov 7, 2023
Jun 18, 2012
Jun 10, 2012
Nov 7, 2023
Nov 7, 2013

Repository files navigation

PyVantagePro

PyVantagePro is a python project which aims to make the communication with weather stations Davis VantagePro2 easier and more Pythonic.

The main feature of this project is to get data automatically. In order to do so, it uses the basic methods get_archives() (to get archive data) and get_current_data() (to get real-time data).

About configuration, it only uses gettime() and settime() because we are assuming that stations are already configured.

Note: PyVantagePro uses the PyLink lib, offers a universal communication interface with File-Like API.

Examples

>>> from pyvantagepro import VantagePro2
>>>
>>> device = VantagePro2.from_url('tcp:host-ip:port')
>>> # device = VantagePro2.from_serial('COM1', 19200)
>>> device.gettime()
2012-06-13 16:44:56
>>> data = device.get_current_data()
>>> data['TempIn']
87.3
>>> data.raw
4C 4F 4F ... 0D E6 3B
>>> data.filter(('TempIn', 'TempOut', 'SunRise', 'SunSet')).to_csv()
TempIn,TempOut,SunRise,SunSet
87.3,71.5,03:50,19:25

Features

  • Collecting real-time data as a python dictionary
  • Collecting archives as a list of dictionaries
  • Collecting data in a CSV file
  • Updating station time
  • Getting some information about the station, such as date and firmware version.
  • Various types of connections are supported
  • Comes with a command-line script
  • Compatible with Python 3.7 and above (tested in 3.11)

Installation

You can install, upgrade, uninstall PyVantagePro with these commands:

$ pip install pyvantagepro
$ pip install --upgrade pyvantagepro
$ pip uninstall pyvantagepro

Or if you don't have pip:

$ easy_install pyvantagepro

Documentation

See documentation here: http://pyvantagepro.readthedocs.org

About

Communication tools for the Davis VantagePro2 devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.7%
  • Makefile 1.3%