Skip to content

Meteostick Binding ​

This is the binding for the Meteostick weather receiver dongle. This is an RF receiver that can receive data directly from Davis weather devices (and others).

Supported Things ​

This binding support 2 different things types

ThingTypeDescription
meteostick_bridgeBridgeThis is the Meteostick USB stick
meteostick_davis_issThingThis is the Davis Vue ISS

Binding Configuration ​

The Meteostick things need to be manually added - there is no discovery in the Meteostick binding.

First add and configure the Meteostick bridge - the port and frequency band for your region need to be set. Next add the sensor and configure the channel number.

Thing Configuration ​

meteostick_bridge Configuration Options ​

OptionDescription
portSets the serial port to be used for the stick
modeSets the mode (frequency band)

Set mode to one of the following depending on your device and region:

ModeDeviceRegionFrequency
0DavisNorth America915 Mhz
1DavisEurope868 Mhz
2DavisAustralia915 Mhz
3Fine OffsetNorth America915 Mhz
4Fine OffsetEurope868 Mhz
5DavisNew Zealand931.5 Mhz

meteostick_davis_iss Configuration Options ​

OptionDescription
channelSets the RF channel used for this sensor
spoonSize of rain spoon assembly for this sensor in mm. Default value is 0.254 (0.01") for use with Davis part number 7345.280. Set to 0.2 for use with Davis part number 7345.319
deltaWindDirectionFor Davis 6410, 7911 & 7914 anemometers, if your anemometer cannot be mounted aiming true North set the direction it is aiming here (0 to 359 degrees). Default is 0 (for North)

Channels ​

Meteostick ​

Channel Type IDItem TypeDescription
pressureNumber:PressureAir pressure
indoor-temperatureNumber:TemperatureIndoor temperature

Davis ISS ​

Channel Type IDItem TypeDescription
outdoor-temperatureNumber:TemperatureOutside temperature
humidityNumberHumidity
wind-directionNumber:AngleWind direction
wind-direction-last2min-averageNumber:AngleWind direction average over last 2 minutes
wind-speedNumber:SpeedWind speed
wind-speed-last2min-averageNumber:SpeedWind speed average over last 2 minutes
wind-speed-last2min-maximumNumber:SpeedWind speed maximum over last 2 minutes
rain-rawNumberRaw rain counter from the tipping spoon sensor
rain-currenthourNumber:LengthThe rainfall in the last 60 minutes
rain-lasthourNumber:LengthThe rainfall in the previous hour
rain-todayNumber:LengthAccumulated rainfall for today
solar-powerNumberSolar power from the sensor station
signal-strengthNumberReceived signal strength
low-batterySwitchLow battery warning

Rainfall ​

There are four channels associated with rainfall. The raw counter from the tipping bucket is provided, the rainfall in the last 60 minutes is updated on each received rainfall and provides the past 60 minutes of rainfall. The rainfall in the previous hour is the rainfall for each hour of the day and is updated on the hour. The accumulated rainfall for today provides the amount of rain for the current date and will reset to 0 at timezone's midnight.

Full Example ​

This example uploads weather data to for your personal weather station at Weather Underground every two minutes.

Steps:

  1. Install the MeteoStick binding for use with your Davis Vantage Vue Integrated Sensor Suite (ISS).
  2. Register your personal weather station with Weather Underground and make note of the station ID and password issued.
  3. Add the following files to your openHAB configuration:

things/meteostick.things ​

Things can be defined in the .things file as follows:

java
meteostick:meteostick_bridge:receiver [ port="/dev/tty.usbserial-AI02XA60", mode=1 ]
meteostick:meteostick_davis_iss:iss (meteostick:meteostick_bridge:receiver) [ channel=1, spoon=0.2, deltaWindDirection=0 ]

Note the configuration options for port, mode, channel, deltaWindDirection and spoon above and adjust as needed for your specific hardware.

items/meteostick.items ​

dsl
Number:Pressure MeteoStickPressure "Meteostick Pressure [%.1f hPa]"{ channel="meteostick:meteostick_bridge:receiver:pressure" }
Number:Temperature DavisVantageVueOutdoorTemperature "ISS Outdoor Temp [%.1f °C]" { channel="meteostick:meteostick_davis_iss:iss:outdoor-temperature" }
Number DavisVantageVueHumidity "ISS Humidity [%.0f %%]" { channel="meteostick:meteostick_davis_iss:iss:humidity" }
Number:Angle DavisVantageVueWindDirection "ISS Wind Direction [%.0f °]" { channel="meteostick:meteostick_davis_iss:iss:wind-direction" }
Number:Angle DavisVantageVueWindDirectionAverage "ISS Average Wind Direction [%.0f °]" { channel="meteostick:meteostick_davis_iss:iss:wind-direction-last2min-average" }
Number:Speed DavisVantageVueWindSpeed "ISS Wind Speed [%.1f m/s]" { channel="meteostick:meteostick_davis_iss:iss:wind-speed" }
Number:Speed DavisVantageVueWindSpeedAverage "ISS Average Wind Speed [%.1f m/s]" { channel="meteostick:meteostick_davis_iss:iss:wind-speed-last2min-average" }
Number:Speed DavisVantageVueWindSpeedMaximum "ISS Maximum Wind Speed [%.1f m/s]" { channel="meteostick:meteostick_davis_iss:iss:wind-speed-last2min-maximum" }
Number:Length DavisVantageVueRainCurrentHour "ISS Rain Current Hour [%.1f mm]" { channel="meteostick:meteostick_davis_iss:iss:rain-currenthour" }
Number:Length DavisVantageVueRainToday "ISS Rain Today [%.1f mm]" { channel="meteostick:meteostick_davis_iss:iss:rain-today" }

rules/meteostick.rules ​

Replace YOUR_ID and your_password below with the values from the the Weather Underground registration process.

rules
import java.net.URLEncoder
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Map
import java.util.TimeZone

/* Uploads weather station data using the format documented here:

   https://feedback.weather.com/customer/en/portal/articles/2924682-pws-upload-protocol?b_id=17298
 */

rule PWS
when
 Item DavisVantageVueWindDirectionAverage received update
then
 val id = 'YOUR_ID'
 val pw = 'your_password'
 val sdf = new SimpleDateFormat('yyyy-MM-dd HH:mm:ss')
 sdf.setTimeZone(TimeZone.getTimeZone('UTC'))
 val double rh = DavisVantageVueHumidity.getStateAs(DecimalType).doubleValue
 val double tempc = DavisVantageVueOutdoorTemperature.getStateAs(QuantityType).toUnit('°C').doubleValue
 val double dewptc = 243.04 * (Math.log(rh/100) + ((17.625 * tempc) / (243.04 + tempc))) / (17.625 - Math.log(rh/100) - ((17.625 * tempc) / (243.04 + tempc)))
 val double dewptf = new QuantityType(dewptc, CELSIUS).toUnit('°F').doubleValue
 val Map<String, Object> params = newLinkedHashMap(
  'action' ->           'updateraw',
  'ID' ->               id,
  'PASSWORD' ->         pw,
  'dateutc' ->          sdf.format(new Date()),
  'winddir' ->          DavisVantageVueWindDirection.getStateAs(QuantityType).toUnit('°').intValue,
  'windspeedmph' ->     DavisVantageVueWindSpeed.getStateAs(QuantityType).toUnit('mph').doubleValue,
  'windgustmph' ->      DavisVantageVueWindSpeedMaximum.getStateAs(QuantityType).toUnit('mph').doubleValue,
  'windgustdir' ->      DavisVantageVueWindDirectionAverage.getStateAs(QuantityType).toUnit('°').intValue,
  'windspdmph_avg2m' -> DavisVantageVueWindSpeedAverage.getStateAs(QuantityType).toUnit('mph').doubleValue,
  'winddir_avg2m' ->    DavisVantageVueWindDirectionAverage.getStateAs(QuantityType).toUnit('°').intValue,
  'humidity' ->         DavisVantageVueHumidity.state,
  'dewptf' ->           dewptf,
  'tempf' ->            DavisVantageVueOutdoorTemperature.getStateAs(QuantityType).toUnit('°F').doubleValue,
  'rainin' ->           DavisVantageVueRainCurrentHour.getStateAs(QuantityType).toUnit('in').doubleValue,
  'dailyrainin' ->    DavisVantageVueRainToday.getStateAs(QuantityType).toUnit('in').doubleValue,
  'baromin' ->          MeteoStickPressure.getStateAs(QuantityType).toUnit('inHg').doubleValue,
  'softwaretype' ->     'openHAB 2.4')

 var url = 'https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?'
 var first = true
 for (key : params.keySet()) {
  if (!first) {
   url += '&'
  }
  url += key + '=' + URLEncoder::encode(params.get(key).toString, 'UTF-8')
  first = false
 }

 logDebug('PWS', 'url is {}', url)
 sendHttpGetRequest(url)
end

openHAB will now report your weather station data to Weather Underground every two minutes.