Weather station recommendation?

if you have split out sensors into their own YAML file, yes.
Otherwise they would go into configuration.yaml

1 Like

I made some slight modifications to your example and it worked!

When I initially got everything working the naming scheme was “cotech_376959_121_ws” and so on. I renemed the device to “Weather Station” and it updated everything like: sensor.weather_station_ws

I’ve also included a conversion for rain from mm to inches

sensor:
  - platform: template
    sensors:
      weather_station_wind_mph:
        friendly_name: "Wind Speed Miles per Hour"
        unique_id:     "Wind Speed MPH"
        value_template: "{{ (states('sensor.weather_station_ws') | float(0.0) | round(1) * 0.6213712) | round(1) }}"
        unit_of_measurement: 'mph'
        
      weather_station_gust_mph:
        friendly_name: "Gust Speed Miles per Hour"
        unique_id:     "Gust Speed MPH"
        value_template: "{{ (states('sensor.weather_station_gs') | float(0.0) | round(1) * 0.6213712) | round(1) }}"
        unit_of_measurement: 'mph'
        
      wind_dir_abbrev:
        friendly_name: "Wind Direction Abbrev"
        unique_id:     "Wind Direction Abbrev"
        value_template: >-
          {% set degrees = states('sensor.weather_station_wd')   | int %}
          {%   if degrees >=   0 and degrees <=  11 %}
            North
          {% elif degrees >=  12 and degrees <=  33 %}
            North-Northeast
          {% elif degrees >=  34 and degrees <=  56 %}
            Northeast
          {% elif degrees >=  57 and degrees <=  78 %}
            East-Northeast
          {% elif degrees >=  79 and degrees <= 101 %}
            East
          {% elif degrees >= 102 and degrees <= 123 %}
            East-Southeast
          {% elif degrees >= 124 and degrees <= 146 %}
            Southeast
          {% elif degrees >= 147 and degrees <= 168 %}
            South-Southeast
          {% elif degrees >= 169 and degrees <= 191 %}
            South
          {% elif degrees >= 192 and degrees <= 213 %}
            South-Southwest
          {% elif degrees >= 214 and degrees <= 236 %}
            Southwest
          {% elif degrees >= 237 and degrees <= 258 %}
            West-Southwest
          {% elif degrees >= 259 and degrees <= 281 %}
            West
          {% elif degrees >= 282 and degrees <= 303 %}
            West-Northwest
          {% elif degrees >= 304 and degrees <= 326 %}
            Northwest
          {% elif degrees >= 327 and degrees <= 348 %}
            North-Northwest
          {% elif degrees >= 349 and degrees <= 359 %}
            North
          {% else %}
            ???
          {% endif %}
      
      weather_station_rain_in:
        friendly_name: "Rainfall Inches"
        unique_id:     "Rainfall Inches"
        value_template: "{{ (states('sensor.weather_station_rt') | float(0.0) | round(2) * 0.0393701) | round(2) }}"
        unit_of_measurement: 'in'    

Congratulations!!! :partying_face:

Now, for rainfall there are utility_meter items that can provide daily, weekly, monthly, and annual measurements. Here is what i have so far, but I haven’t yet worked out the proper decimal placement for accurate measurements.

#
# Utility Meter
# Used with the weather station for periodic measurements
#
utility_meter:
  rainfall_mm_daily:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_daily_mm
    name: 'Rainfall Today Millimeters'
    cycle: daily

  rainfall_mm_weekly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_weekly_mm
    name: 'Rainfall Weekly Millimeters'
    cycle: weekly

  rainfall_mm_monthly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_monthly_mm
    name: 'Rainfall Monthly Millimeters'
    cycle: monthly

  rainfall_mm_yearly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_yearly_mm
    name: 'Rainfall Yearly Millimeters'
    cycle: yearly

sensor:
  - platform: template
      rainfall_in_daily:
        friendly_name: "Rainfall Today Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_today_millimeters_2') | float(0.0) * 0.3937 }}

      rainfall_in_weekly:
        friendly_name: "Rainfall Weekly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_weekly_millimeters') | float(0.0) * 0.3937 }}

      rainfall_in_monthly:
        friendly_name: "Rainfall Monthly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_monthly_millimeters')  | float(0.0) * 0.3937 }}

      rainfall_in_yearly:
        friendly_name: "Rainfall Annual Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_yearly_millimeters')  | float(0.0) * 0.3937 }}
1 Like

Maybe this one?

utility_meter:
  rainfall_mm_daily:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_daily_mm
    name: 'Rainfall Today Millimeters'
    cycle: daily

  rainfall_mm_weekly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_weekly_mm
    name: 'Rainfall Weekly Millimeters'
    cycle: weekly

  rainfall_mm_monthly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_monthly_mm
    name: 'Rainfall Monthly Millimeters'
    cycle: monthly

  rainfall_mm_yearly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_yearly_mm
    name: 'Rainfall Yearly Millimeters'
    cycle: yearly

sensor:
  - platform: template
    sensors:
      rainfall_in_daily:
        friendly_name: "Rainfall Today Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_mm_daily') | float(0.0) * 0.0393701 }}

      rainfall_in_weekly:
        friendly_name: "Rainfall Weekly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_mm_weekly') | float(0.0) * 0.0393701 }}

      rainfall_in_monthly:
        friendly_name: "Rainfall Monthly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_mm_monthly')  | float(0.0) * 0.0393701 }}

      rainfall_in_yearly:
        friendly_name: "Rainfall Annual Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ states('sensor.rainfall_mm_yearly')  | float(0.0) * 0.0393701 }}

or rounded to 2 decimals:

utility_meter:
  rainfall_mm_daily:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_daily_mm
    name: 'Rainfall Today Millimeters'
    cycle: daily

  rainfall_mm_weekly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_weekly_mm
    name: 'Rainfall Weekly Millimeters'
    cycle: weekly

  rainfall_mm_monthly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_monthly_mm
    name: 'Rainfall Monthly Millimeters'
    cycle: monthly

  rainfall_mm_yearly:
    source: sensor.cotech_367959_121_rain_mm
    unique_id: rainfall_yearly_mm
    name: 'Rainfall Yearly Millimeters'
    cycle: yearly

sensor:
  - platform: template
    sensors:
      rainfall_in_daily:
        friendly_name: "Rainfall Today Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ (states('sensor.rainfall_mm_daily') | float(0.0) * 0.0393701) | round(2) }}

      rainfall_in_weekly:
        friendly_name: "Rainfall Weekly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ (states('sensor.rainfall_mm_weekly') | float(0.0) * 0.0393701) | round(2) }}

      rainfall_in_monthly:
        friendly_name: "Rainfall Monthly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ (states('sensor.rainfall_mm_monthly')  | float(0.0) * 0.0393701) | round(2) }}

      rainfall_in_yearly:
        friendly_name: "Rainfall Annual Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: >-
          {{ (states('sensor.rainfall_mm_yearly')  | float(0.0) * 0.0393701) | round(2) }}

Here’s the one I’m using now:

sensor:
  - platform: template
    sensors:
      weather_station_wind_mph:
        friendly_name: "Wind Speed Miles per Hour"
        unique_id:     "Wind Speed MPH"
        value_template: "{{ (states('sensor.weather_station_ws') | float(0.0) | round(1) * 0.6213712) | round(1) }}"
        unit_of_measurement: 'mph'
        
      weather_station_gust_mph:
        friendly_name: "Gust Speed Miles per Hour"
        unique_id:     "Gust Speed MPH"
        value_template: "{{ (states('sensor.weather_station_gs') | float(0.0) | round(1) * 0.6213712) | round(1) }}"
        unit_of_measurement: 'mph'
        
      wind_dir_abbrev:
        friendly_name: "Wind Direction Abbrev"
        unique_id:     "Wind Direction Abbrev"
        value_template: >-
          {% set degrees = states('sensor.weather_station_wd')   | int %}
          {%   if degrees >=   0 and degrees <=  11 %}
            North
          {% elif degrees >=  12 and degrees <=  33 %}
            North-Northeast
          {% elif degrees >=  34 and degrees <=  56 %}
            Northeast
          {% elif degrees >=  57 and degrees <=  78 %}
            East-Northeast
          {% elif degrees >=  79 and degrees <= 101 %}
            East
          {% elif degrees >= 102 and degrees <= 123 %}
            East-Southeast
          {% elif degrees >= 124 and degrees <= 146 %}
            Southeast
          {% elif degrees >= 147 and degrees <= 168 %}
            South-Southeast
          {% elif degrees >= 169 and degrees <= 191 %}
            South
          {% elif degrees >= 192 and degrees <= 213 %}
            South-Southwest
          {% elif degrees >= 214 and degrees <= 236 %}
            Southwest
          {% elif degrees >= 237 and degrees <= 258 %}
            West-Southwest
          {% elif degrees >= 259 and degrees <= 281 %}
            West
          {% elif degrees >= 282 and degrees <= 303 %}
            West-Northwest
          {% elif degrees >= 304 and degrees <= 326 %}
            Northwest
          {% elif degrees >= 327 and degrees <= 348 %}
            North-Northwest
          {% elif degrees >= 349 and degrees <= 359 %}
            North
          {% else %}
            ???
          {% endif %}
      
      weather_station_rain_in:
        friendly_name: "Rainfall Inches"
        unique_id:     "Rainfall Inches"
        value_template: "{{ (states('sensor.weather_station_rt') | float(0.0) | round(2) * 0.0393701) | round(2) }}"
        unit_of_measurement: 'in'          
        
#### conversion of rain from mm to in for utility meter tracking ###        
  - platform: template
    sensors:
      rainfall_in_daily:
        unique_id: "rainfall_in_daily"
        friendly_name: "Rainfall Today Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: "{{ (states('sensor.rainfall_today_millimeters') | float(0.0) * 0.0393701) | round(2) }}"

      rainfall_in_weekly:
        unique_id: "rainfall_in_weekly"
        friendly_name: "Rainfall Weekly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: "{{ (states('sensor.rainfall_weekly_millimeters') | float(0.0) * 0.0393701) | round(2) }}"

      rainfall_in_monthly:
        unique_id: "rainfall_in_monthly"
        friendly_name: "Rainfall Monthly Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: "{{ (states('sensor.rainfall_monthly_millimeters')  | float(0.0) * 0.0393701) | round(2) }}"

      rainfall_in_yearly:
        unique_id: "rainfall_in_yearly"
        friendly_name: "Rainfall Annual Inches"
        device_class: 'precipitation'
        unit_of_measurement: 'in'
        value_template: "{{ (states('sensor.rainfall_yearly_millimeters')  | float(0.0) * 0.0393701) | round(2) }}"
        
utility_meter:
  rainfall_mm_daily:
    source: sensor.weather_station_rt
    unique_id: rainfall_daily_mm
    name: 'Rainfall Today Millimeters'
    cycle: daily

  rainfall_mm_weekly:
    source: sensor.weather_station_rt
    unique_id: rainfall_weekly_mm
    name: 'Rainfall Weekly Millimeters'
    cycle: weekly

  rainfall_mm_monthly:
    source: sensor.weather_station_rt
    unique_id: rainfall_monthly_mm
    name: 'Rainfall Monthly Millimeters'
    cycle: monthly

  rainfall_mm_yearly:
    source: sensor.weather_station_rt
    unique_id: rainfall_yearly_mm
    name: 'Rainfall Yearly Millimeters'
    cycle: yearly
2 Likes

Warning tip for others:
I had to replace the batteries in my weather station tonight, after over a year of solid performance. When I did so, the ID value changed from 121 to 0, which changed the MQTT topic “rtl_433/17069798-rtl433/devices[/type][/model][/subtype][/channel][/id]”. I had to edit all of my MQTT sensors and reload YAML files to get the data coming in again.

1 Like

Sold under the label “Misol”

1 Like

Can you expand on this? I have a greenhouse I want to incorporate. I am new and have not done any integrations with a RTL-SDR Blog V3 R860 RTL2832U 1PPM TCXO SMA Software Defined Radio

GW2000A from froggit without a cloud directly with restFUL try it as my_weather.yaml

The Router ist located in my local network over WLAN with own IP xxx.xxx

but it is always sunny :wink: In the moment it’s not perfect, but it grows up!


rest:
  - authentication: basic
#    username: "admin"
#    password: "password"
    scan_interval: 300
    # curl -s http://192.168.xxx.xxx/get_livedata_info?
    resource: http://192.168.xxx.xxx/get_livedata_info?
    headers:
      Content-Type: application/json    
    method: GET

    sensor:

      - name: "Temperatur Außen"
        value_template: "{{ value_json['common_list'][0]['val'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
        unique_id: temp_aussen

      - name: "Luftfeuchte Außen"
        value_template: "{{ value_json['common_list'][1]['val'][:-1] | default(0) | float(0) }}"
        unit_of_measurement: "%"
        device_class: humidity
        state_class: measurement 
        unique_id: luftfeuchte_aussen

      - name: "Temperatur 2"
        value_template: "{{ value_json['common_list'][2]['val'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement 
        unique_id: temp_out2

      - name: "Temperatur 3"
        value_template: "{{ value_json['common_list'][3]['val'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement 
        unique_id: temp_out3      

      - name: "Temperatur 4"
        value_template: "{{ value_json['common_list'][4]['val'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement 
        unique_id: temp_out4

      - name: "Temperatur 5"
        value_template: "{{ value_json['common_list'][5]['val'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement 
        unique_id: temp_out5      

      - name: "Wind geschwindigkeit"
        value_template: "{{ value_json['common_list'][6]['val'][:-5] | default(0) | float(0) }}"
        unit_of_measurement: "km/h"
        device_class: wind_speed
        state_class: measurement 
        unique_id: wind_geschwindigkeit    

      - name: "Wind 7"
        value_template: "{{ value_json['common_list'][7]['val'][:-5] | default(0) | float(0) }}"
        unit_of_measurement: "km/h"
        device_class: wind_speed
        state_class: measurement 
        unique_id: wind7   

      - name: "Wind 8"
        value_template: "{{ value_json['common_list'][8]['val'][:-5] | default(0) | float(0) }}"
        unit_of_measurement:  "km/h"
        device_class: wind_speed
        state_class: measurement 
        unique_id: wind8   

      - name: "Solar"
        value_template: "{{ value_json['common_list'][9]['val'][:-4] | default(0) | float(0) }}"
        unit_of_measurement: "W/m²"
        device_class: irradiance
        state_class: measurement 
        unique_id: solar   

      - name: "UV Index"
        value_template: "{{ value_json['common_list'][10]['val'] |int }}"
        unit_of_measurement:  "-"
        device_class: irradiance
        state_class: measurement 
        unique_id: uv_index   

      - name: "Windrichtung"
        value_template: "{{ value_json['common_list'][11]['val'] |int }}"
      
        #value_template: >
        #    {% set direction = ['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','N'] %}
        #    {{ direction[(((value_json['common_list'][11]['val']| default(0) | float(0)) +11.25)/22.5)|int] }}        
        unit_of_measurement:  "-"
        device_class: wind_speed
        state_class: measurement 
        unique_id: windrichtung  


      - name: "Regenmenge Ereignis"
        value_template: "{{ value_json['rain'][0]['val'][:-3] | default(0) | float(0) }}"
        unit_of_measurement:  "mm"
        device_class: precipitation
        state_class: measurement 
        unique_id: regenmenge_ereignis

      - name: "Regenrate"
        value_template: "{{ value_json['rain'][1]['val'][:-6] | default(0) | float(0) }}"
        unit_of_measurement:  "mm/Hr"
        device_class: precipitation
        state_class: measurement 
        unique_id: Regenrate

      - name: "Regenmenge täglich"
        value_template: "{{ value_json['rain'][2]['val'][:-3] | default(0) | float(0) }}"
        unit_of_measurement:  "mm"
        device_class: precipitation
        state_class: measurement 
        unique_id: regenmenge_taeglich

      - name: "Regenmenge wĂśchentlich"
        value_template: "{{ value_json['rain'][3]['val'][:-3] | default(0) | float(0) }}"
        unit_of_measurement:  "mm"
        device_class: precipitation
        state_class: measurement 
        unique_id: regenmenge_woechentlich

      - name: "Regenmenge monatlich"
        value_template: "{{ value_json['rain'][4]['val'][:-3] | default(0) | float(0) }}"
        unit_of_measurement:  "mm"
        device_class: precipitation
        state_class: measurement 
        unique_id: regenmenge_monatlich

      - name: "Regenmenge jährlich"
        value_template: "{{ value_json['rain'][5]['val'][:-3] | default(0) | float(0) }}"
        unit_of_measurement:  "mm"
        device_class: precipitation
        state_class: measurement 
        unique_id: regenmenge_jaehrlich

      - name: "Batterieentleerung"
        value_template: "{{ value_json['rain'][5]['battery'] | default(0) | float(0) }}"
        unit_of_measurement:  "%"
        device_class: battery
        state_class: measurement 
        unique_id: batterie

      - name: "Temperatur innen"
        value_template: "{{ value_json['wh25'][0]['intemp'] | default(0) | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement 
        unique_id: temperatur_innen  

      - name: "Luftfeuchte innen"
        value_template: "{{ value_json['wh25'][0]['inhumi'][:-1] | default(0) | float(0) }}"
        unit_of_measurement: "%"
        device_class: humidity
        state_class: measurement 
        unique_id: luftfeuchte_innen    

      - name: "Luftdruck abs"
        value_template: "{{ value_json['wh25'][0]['abs'][:-4] | default(0) | float(0) }}"
        unit_of_measurement: "hPa"
        device_class: atmospheric_pressure
        state_class: measurement 
        unique_id: luftdruck_abs

      - name: "Luftdruck rel"
        value_template: "{{ value_json['wh25'][0]['rel'][:-4] | default(0) | float(0) }}"
        unit_of_measurement: "hPa"
        device_class: atmospheric_pressure
        state_class: measurement 
        unique_id: luftdruck_rel

weather:
  - platform: template
    name: "Wetter Tomroden"
    unique_id: tomroden_wetter
    temperature_template: "{{ states('sensor.temp_aussen') | float(0.0) }}"
    humidity_template: "{{ states('sensor.luftfeuchte_aussen') | float(0.0)  }}"
    pressure_template: "{{ states('sensor.luftdruck_abs') | float(0.0) }}"
    wind_speed_template: "{{ states('sensor.wind_geschwindigkeit') | int(0)  }}"
    wind_bearing_template: "{{ states('sensor.windrichtung') | int(0)  }}"
    attribution_template: "{{ states('sensor.temp_aussen') | float(0.0)  }}"
    condition_template: "sunny"




Hi, I just bought Waldbeck Huygens 6 in 1. It’s up and running, transmitting data to the base station. I got stuck connecting it via rtl_433.
According to the instruction, it transmits at 868MHz. I’m running:
rtl_433 -f 868M -s 1024k
but I’m not getting any reads. Any clue?

I tested the dongle by scanning 433MHz frequency and it reads eg my garage door remote, so I assume the dongle works, but why doesn’t it read anything on 868MHz?

Hello @ghstudio would you mind sharing your yaml config for the WH-40? I’m struggling to make sense of the data.

I started trying to deal with the raw data directly, but I decided to take the easy path using a GW100B. I use the ecowitt integration … and I just display all values. The most difficult part is configuring the GW1100B. Once you have that setup correctly, the values are all sensor.gw1100b.whatever. My guess is that you are trying without the controller, like I did originally and I can’t help because I abandon that approach.