Weather Station Data

Can I send data from my weather sensors in HomeAssistant as PWS data to Weather underground?

Cumulus can now export to MQTT for any weather station sensors, so if you have a fine offset, Davis, Ecowitt etc, you only need to use Cumulus.

What is the input to Cumulus, USB port ?

yes or ip depending on the weather stationā€¦ my Davis was usb and the ecowitt is via ip address on local lan

Cool, can I run Cumulus on the same RPi as HA ?

I donā€™t see why not. I used to but now have them running on different devices.

I am using openhab with the ip observer units, works well with no cloud and local scrapping at. 12 second intervals.

Info on how it is done is found here and you can keep your ambient weather screens and add on the ip observer for around $50 if your weather station does not have one.

Would love to see HA support this method.

Is the IP Observer an IP gateway ?
If so does it use the Ecowitt IP packets ?

The reason I ask is the late firmware for a lot of Ecowitt (AKA Fine Offset) WiFi stations now support a custom server upload using their Ecowitt protocol (as well as WU, WeatherCloud etc).
If the IP Observer hardware uses it then by default a lot of WiFi stations might also work with that method aboveā€¦

No idea what those packets are. The ip observer works by displaying a summery of all the data on a HTML page that can be fetched and scraped for the data. A simple GET request and you have all the data locally with no cloud and updated every 12 seconds. I donā€™t
Know of any other weather station that is in the same price range and can do that at the same time it uploads to weather underground.

OK Thanks.

Something I had in mind as possible also is use a NodeMCU or ESP32 module to accept the Ecowitt packets and convert to MQTT for HA (if not via the native ESPhome API). Those modules cost as little as $4.
Unfortunately while I can see the chain of hardware/code required, itā€™s too big a knowledge stretch for me to create that code myself. If we go into lock-down again here I might have the time to learnā€¦

@kslb
it is possible aquire by mqtt soilmosture sensor?
I have Ecowill WH51 sensor

Sorry, donā€™t know that - this is question for weeWX communityā€¦

I was looking to add the data from my weather startion directly to the DB in HA. Found the homeassistant_ecowitt intergration in Community HACS. If youā€™ve got the WS View app you can configure the connection in the Customized Server tab to point the data at your HA IP and chosen port.

Hey guys,
my weewx wontā€™s start, any ideas why?

Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/user/interceptor.py", line 427, in __init__
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****      iface, pcap_filter, promiscuous)
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/user/interceptor.py", line 469, in __init__
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****      self.sniffer.open_live(iface, snaplen, pval, timeout_ms)
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****    File "/usr/lib/python2.7/dist-packages/pcap.py", line 108, in open_live
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****      def open_live(self, *args): return _pcap.pcapObject_open_live(self, *args)
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL weewx.engine:     ****  TypeError: in method 'pcapObject_open_live', argument 2 of type 'char *'
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL __main__: Unable to load driver: in method 'pcapObject_open_live', argument 2 of type 'char *'
Jun 24 10:50:56 raspberrypi weewx[1404] CRITICAL __main__:     ****  Exiting...

Weewx config file problemā€¦

Try to update weewx platform and go line by line in configurationā€¦

Also it seems that you do not have installed all used add-ons in weewx. Where do you run weewx?

It happened after an apt upgrade. I think something broke during the install, might be some python incompatibility.
Running it on a raspberry pi 3.

Solved uninstalling and cleaning up everything related to python3.

Question, is there a way to use our own wx station data to populate the weather card? It would be awesome to have such an option.

For Proxmox users here is clone of up-to-date (20.04.2022) Raspberrian OS with working weeWX image.

Username:
homeassistant
Password:
virtualclone2020_weeWX%

Proxmox image:
https://www.vseznalec.si/homeassistant/weewx.vma.zst
MySQL database:
https://www.vseznalec.si/homeassistant/weewx.sql

sensor:
  - platform: mqtt
    name: "Relativna vlažnost"
    icon: mdi:water-percent
    state_topic: "weather/outHumidity"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "%"

  - platform: mqtt
    name: "Pritisk (viŔinomer)"
    icon: mdi:gauge
    state_topic: "weather/altimeter_mbar"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "mBar"

  - platform: mqtt
    name: "Pritisk"
    icon: mdi:gauge
    state_topic: "weather/pressure_mbar"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "mBar"

  - platform: mqtt
    name: "Stopnja padavin"
    icon: mdi:umbrella-outline
    state_topic: "weather/rainRate_cm_per_hour"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "mm/h"

  - platform: mqtt
    name: "Stopnja padavin (zadnja ura)"
    icon: mdi:umbrella
    state_topic: "weather/hourRain_cm"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "mm/h"

  - platform: mqtt
    name: "Padavine (danes)"
    icon: mdi:umbrella
    state_topic: "weather/rain24_cm"
    value_template: '{{ value | round(0) }}'
    unit_of_measurement: "mm"

  - platform: mqtt
    name: "Temperatura"
    state_topic: "weather/outTemp_C"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "Ā°C"

  - platform: mqtt
    name: "Sončno sevanje"
    icon: mdi:radioactive
    state_topic: "weather/radiation_Wpm2"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "watts/mĀ²"

  - platform: mqtt
    name: "UV"
    icon: mdi:sunglasses
    state_topic: "weather/UV"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "index"

  - platform: mqtt
    name: "Hitrost vetra"
    icon: mdi:weather-windy
    state_topic: "weather/windSpeed_kph"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "km/h"

  - platform: mqtt
    name: "Sunek vetra"
    icon: mdi:weather-windy-variant
    state_topic: "weather/windGust_kph"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "km/h"

  - platform: mqtt
    name: "Smer vetra"
    icon: mdi:wind-turbine
    state_topic: "weather/windDir"
    value_template: '{{ value | round(1) }}'
    unit_of_measurement: "Ā°"

How to edit config file:

USR - Username
PW - Password
XXX - Missing data

MySQL data:

MQTT data:
slika

Additional settings:
slika

For additional info and settings how to make DNAT forwarding check step 2:

BR,
Simon

1 Like

please, help me: first steps into Home Assistant
Weewx running, MQTT working, I copied KSLB configuration into HA configuration file,and I can succesfully verify the config, but I canā€™t obtain the sensors.
hereā€™s my complete config.yaml


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


wundergroundpws:
  api_key: xxxxxxxxxxxxxxxxxxxxxxxxx
  pws_id: xxxx
  numeric_precision: none

# Required to generate HASS weather Entity for weather forecast card
weather:
  - platform: wundergroundpws

# Required if you wish to add sensors
sensor:
  - platform: wundergroundpws
    monitored_conditions:
    - humidity
    - precipRate
    - precipTotal
    - pressure
    - temp
    - windSpeed

media_source:

# Terrazzo
- platform: foscam
  ip: xxxxxxxxxx
  port: xx
  username: !secret camera_login
  password: !secret camera_psw
  name: Terrazzo

# Veranda
- platform: foscam
  ip: xxxxxxxxxxxxxx
  port: xxxx
  username: !secret camera_login
  password: !secret camera_psw
  name: Veranda

# Cucina
- platform: foscam
  ip: xxxxxxxxxxxxxxx
  port: xxxxxx
  username: !secret camera_login
  password: !secret camera_psw
  name: Cucina

# Garage
- platform: foscam
  ip: xxxxxxxxxxx
  port: xxx
  username: !secret camera_login
  password: !secret camera_psw
  name: Garage
  
- platform: mqtt
  name: "Relativna vlažnost"
  icon: "mdi:water-percent"
  state_topic: "weather/outHumidity"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "%"
  
- platform: mqtt
  name: "Pritisk (viŔinomer)"
  icon: mdi:gauge
  state_topic: "weather/altimeter_mbar"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "mBar"

- platform: mqtt
  name: "Pritisk"
  icon: mdi:gauge
  state_topic: "weather/pressure_mbar"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "mBar"

- platform: mqtt
  name: "Stopnja padavin"
  icon: mdi:umbrella-outline
  state_topic: "weather/rainRate_cm_per_hour"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "mm/h"

- platform: mqtt
  name: "Stopnja padavin (zadnja ura)"
  icon: mdi:umbrella
  state_topic: "weather/hourRain_cm"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "mm/h"

- platform: mqtt
  name: "Padavine (danes)"
  icon: mdi:umbrella
  state_topic: "weather/rain24_cm"
  value_template: '{{ value | round(0) }}'
  unit_of_measurement: "mm"

- platform: mqtt
  name: "Temperatura"
  state_topic: "weather/outTemp_C"
  value_template: '{{ value | round(1) }}'
  unit_of_measurement: "Ā°C"

- platform: mqtt
  name: "Hitrost vetra"
  icon: mdi:weather-windy
  state_topic: "weather/windSpeed_kph"
  value_template: '{{ value | round(1) }}'
  unit_of_measurement: "km/h"

- platform: mqtt
  name: "Sunek vetra"
  icon: mdi:weather-windy-variant
  state_topic: "weather/windGust_kph"
  value_template: '{{ value | round(1) }}'
  unit_of_measurement: "km/h"

thanks

Looks like you are using the old format for Mqtt sensors.

They should be similar to the below:

mqtt:
    sensor:
        - name:   
1 Like