Skip to content

Service to add NMEA0183 XDR data to a weewx data stream

License

Notifications You must be signed in to change notification settings

tkeffer/weewx-nmea-xdr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nmea-xdr

WeeWX service that decodes NMEA 0183 "XDR" sentences and adds values to the WeeWX data stream.

Tested on a Dracal USB-BAR20-N. This is an interesting little instrument because it can add accurate barometric pressure to a data stream, making it perfect for those who are collecting data using a software-defined radio (SDR).

Installation instructions

  1. Download and install the extension

    cd /home/weewx
    wget https://github.com/tkeffer/weewx-nmea-xdr/archive/nmea-xdr-0.1.0.tar.gz
    wee_extension --install=nmea-xdr-0.1.0.tar.gz
  2. Edit the new stanza [XDR] to reflect your situation. Here's an example:

     [XDR]
         port = /dev/ttyUSB0
     
         # Map from weewx names to sensor names. Only these types will be processed.
         # Typical sensor map:
         [[sensor_map]]
             pressure = P    # Raw, station pressure

    This example most relies on the defaults, although it adds an explicity device port where the NMEA device can be found (/dev/ttyUSB0).

    It maps only one observation type, pressure, to the incoming XDR data, P.

  3. Restart WeeWX. For example:

    sudo systemctl stop weewx
    sudo systemctl start weewx
  4. With every LOOP packet, the queue of NMEA sentences will be drained. All data listed in the sensor map will be parsed and added to the LOOP packet.

Manual installation instructions

  1. Include a stanza in your weewx.conf configuration file:

    [XDR]
        port = /dev/ttyACM0         # Default is '/dev/ttyACM0'
        baudrate = 9600             # Default is '9600'
        timeout = 5                 # How long to wait for an XDR packet. Default is 5
        max_packets = 5             # Max number of packets to process during a LOOP event. Default is 5
    
        # Map from weewx names to sensor names. Only these types will be processed.
        # Typical sensor map:
        [[sensor_map]]
            pressure = P    # Raw, station pressure
            outTemp = C     # Temperature
  2. Add the XDR service to the list of data_services to be run:

    [Engine]
      [[Services]]
        ...
        data_services = nmea-xdr.py
  3. Put this file (nmea-xdr.py) in your WeeWX user subdirectory. For example, if you installed using setup.py,

    cp nmea-xdr.py /home/weewx/bin/user
  4. Restart WeeWX. For example:

    sudo systemctl stop weewx
    sudo systemctl start weewx
  5. With every LOOP packet, the queue of NMEA sentences will be drained. All data listed in the sensor map will be parsed and added to the LOOP packet.

About

Service to add NMEA0183 XDR data to a weewx data stream

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages