Skip to main content

Communication tools for the Davis VantagePro2 devices

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

https://secure.travis-ci.org/SalemHarrache/PyVantagePro.png?branch=master

PyVantagePro is a python project which aims to make the communication with weather stations Davis VantagePro2 easier and funnier…i.e. 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('tcp:host-ip:port')
>>> device.gettime()
2012-06-13 16:44:56
>>> data = device.get_current_data()
>>> data['TempIn']
87.1
>>> data.raw
4C 4F 4F ... 0D E6 3B
>>> data.filter(('TempIn', 'TempOut', 'SunRise', 'SunSet')).to_csv()
SunRise,SunSet,TempIn,TempOut
03:50,19:25,87.3,71.5

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 2.6+ and 3.x

Documentation

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

Changelog

Version 0.3

Released on 2012-06-27.

  • Use ordereddict to order data fields (Datetime field first)

  • Fix a bug related to timeout

  • Set timeout to 10 sec by default

Version 0.2

Released on 2012-06-20.

  • Remove blist from requirements

  • Minor bug fixes

Version 0.1

Released on 2012-06-14.

  • First properly tagged release.

  • Support VantagePro2 revB only.

  • Parsing binary data into dict and list of dict.

  • Command-line script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyVantagePro-0.3.tar.gz (65.4 kB view details)

Uploaded Source

File details

Details for the file PyVantagePro-0.3.tar.gz.

File metadata

  • Download URL: PyVantagePro-0.3.tar.gz
  • Upload date:
  • Size: 65.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyVantagePro-0.3.tar.gz
Algorithm Hash digest
SHA256 c9d78527388fc7c5f869919e171586ec129cb4831762b077c64a27151c75e281
MD5 285b1039f73bd5a95e1d82edbc47fe0f
BLAKE2b-256 90007c6a3bb6af5b36fc81ccb39e294f7e2fe50c67885f97cc61043bb0914950

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page