The bigger version of the realtime data container providing HighsAndLows and RichRealtimeData. Only works on Vantage Pro 2 and Vue (having firmware dated after April 24, 2002 / v1.90 or above).

What are realtime data containers?

Realtime data containers provide another level of abstraction to interact with your weather station. Instead of manually calling methods like VantInterface.getHighsAndLows or VantPro2Interface.getRichRealtimeData, you just access the properties of an instance of this class. E.g. to get the current outside temperature you just create a realtime data container and access it using container.tempOut.

Internally this works via an update cycle. Every container.settings.updateInterval seconds the container uses an interface to update its properties. As the realtime data container is an EventEmitter, you can listen to the "update" event. Additionally there is the "valid-update" event which only fires if no error occurrs.

Realtime data containers provide another level of stability. If the console disconnects from your computer the realtime data container stays alive waiting for the console to reconnect.

Hierarchy

Implements

Properties

altimeter: null | number = null

The altimeter setting

chill: null | number = null

The current wind chill

consoleBatteryVoltage: null | number = null

The console's battery voltage

dewpoint: null | number = null

The calculated dew point

etDay: null | number = null

Measured evapotranspiration (ET) of the day

etMonth: null | number = null

Measured evapotranspiration (ET) in the current month

etYear: null | number = null

Measured evapotranspiration (ET) in the current year

forecast: null | "Mostly Clear" | "Partly Cloudy" | "Mostly Cloudy" | "Mostly Cloudy, Rain within 12 hours" | "Mostly Cloudy, Snow within 12 hours" | "Mostly Cloudy, Rain or Snow within 12 hours" | "Partly Cloudy, Rain within 12 hours" | "Partly Cloudy, Rain or Snow within 12 hours" | "Partly Cloudy, Snow within 12 hours" = null

Current forecast computed by the connected vantage console

There are the following options:

  • Sun
  • Partly Cloudy
  • Mostly Cloudy
  • Mostly Cloudy, Rain within 12 hours
  • Mostly Cloudy, Snow within 12 hours
  • Partly Cloudy, Rain or Snow within 12 hours
  • Partly Cloudy, Rain within 12 hours
  • Partly Cloudy, Snow within 12 hours
  • Partly Cloudy, Rain or Snow within 12 hours
forecastID: null | 2 | 3 | 8 | 6 | 7 | 19 | 23 | 18 | 22 = null

The calculated forecast encoded as number:

  • 8 => Mostly Clear
  • 6 => Partly Cloudy
  • 2 => Mostly Cloudy
  • 3 => Mostly Cloudy, Rain within 12 hours
  • 18 => Mostly Cloudy, Snow within 12 hours
  • 19 => Partly Cloudy, Rain or Snow within 12 hours
  • 7 => Partly Cloudy, Rain within 12 hours
  • 22 => Partly Cloudy, Snow within 12 hours
  • 23 => Partly Cloudy, Rain or Snow within 12 hours
forecastRule: null | number = null

Not documented. Please create an issue on github if you know more about this.

heat: null | number = null

The measured heat index

highsAndLows: HighsAndLows = ...

Holds daily, monthly and yearly highs and lows for all weather elements / sensors.

humExtra: [null | number, null | number, null | number, null | number, null | number, null | number, null | number] = ...

Measured extra humidities (from up to 7 sensors)

humIn: null | number = null

Current inside humidity in percent

humOut: null | number = null

Current outside humidity in percent

leafTemps: [null | number, null | number, null | number, null | number] = ...

Measured leaf temperatures (from up to 4 sensors)

leafWetnesses: [null | number, null | number, null | number, null | number] = ...

Measured leaf wetness from up to 4 sensors

press: null | number = null

Current pressure

pressAbs: null | number = null

Absolute barometric pressure. Equals to the raw sensor (pressRaw) reading plus user entered offset (pressUserOffset).

pressCalibrationOffset: null | number = null

The barometer calibration number

pressRaw: null | number = null

Barometric sensor raw reading

pressReductionMethod: null | "user offset" | "altimeter setting" | "NOAA bar reduction" = null

The used barometric reduction method to calculate the ground pressure. There are three different settings:

  • user offset
  • altimeter setting
  • NOAA bar reduction
pressReductionMethodID: null | 0 | 1 | 2 = null

The used barometric reduction method encoded as number. 0 is user offset, 1 is altimeter setting and 2 is NOAA bar reduction.

pressTrend: null | "Falling Rapidly" | "Steady" | "Rising Rapidly" | "Rising Slowly" | "Falling Slowly" = null

The pressure's trend. There are five possible trends:

  • Falling Rapidly
  • Falling Slowly
  • Steady
  • Rising Slowly
  • Rising Rapidly
pressTrendID: null | 0 | 20 | 60 | -60 | -20 = null

The pressure's trend encoded as number.

  • -60 stands for Falling Rapidly
  • -20 stands for Falling Slowly
  • 0 stands for Steady
  • 20 stands for Rising Slowly
  • 60 stands for Rising Rapidly
pressUserOffset: null | number = null

The user-entered barometric offset

rain15m: null | number = null

The amount of rain that has fallen in the recent 15 minutes

rain1h: null | number = null

The amount of rain that has fallen in the recent hour

rain24h: null | number = null

The amount of rain that has fallen in the recent 24 hours

rainDay: null | number = null

The amount of rain that fell today

rainMonth: null | number = null

The amount of rain that has fallen in this month

rainRate: null | number = null

The current rain rate

rainYear: null | number = null

The amount of rain that has fallen in this year

The realtime data container's settings. Immutable.

soilMoistures: [null | number, null | number, null | number, null | number] = ...

Measured soil moisture from up to 4 sensors

soilTemps: [null | number, null | number, null | number, null | number] = ...

Measured soil temperatures (from up to 4 sensors)

solarRadiation: null | number = null

Currently measured solar radiation

stormRain: null | number = null

The most recent rainstorm's amount of rain

stormStartDate: null | Date = null

The most recent rainstorm's start date (without time)

sunrise: null | string = null

The today's sunrise time (e.g. "06:35")

sunset: null | string = null

The today's sunset time (e.g. "19:35")

tempExtra: [null | number, null | number, null | number, null | number, null | number, null | number, null | number] = ...

Measured extra temperatures (from up to 7 sensors)

tempIn: null | number = null

Current inside temperature (the console's temperature)

tempOut: null | number = null

Current outside temperature

thsw: null | number = null

The currently measured THSW index. Requires a solar radiation sensor.

time: Date = ...

The time the record was created

transmitterBatteryStatus: null | number = null

The transmitter's battery status (poorly documented)

uv: null | number = null

Currently measured UV index

wind: null | number = null

Currently measured wind speed

windAvg10m: null | number = null

Average wind speed in the recent ten minutes

windAvg2m: null | number = null

Average wind speed in the recent two minutes

windDir: null | "NNE" | "NE" | "ENE" | "E" | "ESE" | "SE" | "SSE" | "S" | "SSW" | "SW" | "WSW" | "W" | "WNW" | "NW" | "NNW" | "N" = null

Currently measured wind direction encoded as string. Possible values are:

  • NNE
  • NE
  • ENE
  • E
  • ESE
  • SE
  • SSE
  • S
  • SSW
  • SW
  • WSW
  • W
  • WNW
  • NW
  • NNW
  • N
windDirDeg: null | number = null

The wind speed direction in degrees (from 1 to 360). 90° is East, 180° is South, 270°is West and 360° is North.

windGust: null | number = null

Speed of the heaviest gust in the recent 10 minutes

windGustDir: null | "NNE" | "NE" | "ENE" | "E" | "ESE" | "SE" | "SSE" | "S" | "SSW" | "SW" | "WSW" | "W" | "WNW" | "NW" | "NNW" | "N" = null

The heaviest wind gust's (windGust) direction encoded as string. Possible values are:

  • NNE
  • NE
  • ENE
  • E
  • ESE
  • SE
  • SSE
  • S
  • SSW
  • SW
  • WSW
  • W
  • WNW
  • NW
  • NNW
  • N
windGustDirDeg: null | number = null

The heaviest wind gust's (windGust) direction in degrees (from 1 to 360). 90° is East, 180° is South, 270°is West and 360° is North.

defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual realtime data container instances using the setMaxListeners method.

To change the default for all instances, this property can be used. If this value is not a positive number, a RangeError is thrown.

Methods

  • By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual realtime data container instances using this method.

    To change the default for all EventEmitter instances, change defaultMaxListeners.

    Parameters

    • maxListeners: number

      new limit for the amount of listeners for any single event on this realtime data container instance

    Returns BigRealtimeDataContainer

    this (for chaining calls)

  • Starts the realtime data container. Fires a "start" event. Doesn't wait for the serial port connection to be opened.

    Starts the update cycle and tries to connect to the weather station console. If connecting fails, the realtime data container tries to reconnect every settings.updateInterval seconds.

    If the container already got started it is stopped first.

    Returns Promise<void>

  • Starts the realtime data container and waits for the serial port connection to be opened.

    Starts the update cycle and tries to connect to the weather station console. If connecting fails, the realtime data container tries to reconnect every settings.updateInterval seconds.

    If the container got already started it is stopped first.

    Returns Promise<void>

  • Stops the realtime data container, fires a "close" event. The update cycle is stopped and the connection to the weather station gets closed.

    If the realtime data container already got closed no "close" event is thrown.

    Returns Promise<void>

  • Waits for the next update on the realtime data container. If an error occurrs while updating the promise is rejected. This can be used to handle errors. See RealtimeDataContainerEvents.

    Returns Promise<any>

    Example

    try{
    await container.waitForUpdate();
    // ...
    }catch(err){
    // handle error
    }

Generated using TypeDoc