Question: RTL_433 - Acurite weather station and HA

HI,

Thanks to the great forum and online documentation, I was able to install RTL_433 on my RPI and sniff to Acurite weather station.

Executing the command: rtl_433 -q -W -R 39

Gives the following:
2016-11-25 23:15:21 : Acurite tower sensor : 13851 : A
Temperature: 4.7 C
Humidity: 82
Battery: 0
: 68
2016-11-25 23:15:21 : Acurite tower sensor : 13851 : A
Temperature: 4.7 C
Humidity: 82
Battery: 0


Now, how do I make HA run this command and extract the output?
All I want is to display the current temp on the main HA website.

I am quite new to HA and linux, so please be patient :slight_smile:

Thanks,
Guy

Hi Guy,

Your question inspired me to try to connect my Acurite Weather Station to my Home Assistant.

I tried to use my 433 RF receiver on GPIO pins but then I realised you needed a TV receiver to get it to work.

I looked into other options and found Weewx. I was amazed at how it worked pretty well out of the box (It took me 2 days to get it to connect properly with HASS but I’m fairly useless at all this).

I installed the weewx extension for MQTT and finally got it publishing to mosquitto. I am in the process of adding the MQTT sensors so I can see them in HASS.

This is great because I already had the Acurite screen by my computer but it only ever updated to Wunderground when my computer was on. I nearly bought the RF receiving thing that connects straight to your router but that was nearly $100 from memory. This has saved me that money with things I already have. As a result my PWS constantly uploads to Wunderground and as a bonus I can get the sensors straight into HASS.

I realise it might no be what you’re looking for because you’re almost there already and I’m sure there is a way of getting it to work, but I wouldn’t have a clue how to. I’m also sure there’s an easier way to get the sensor data straight from the weewx database avoiding MQTT but in this way I have achieved what I want.

Just did this and it works great. First, use a command line that writes the data to a json-format file:

rtl_433 -F json:/home/homeassistant/.homeassistant/weather.data

Then make a command-line sensor in home assistant to extract just the most recent line. Conveniently the command-line sensor is json aware. I’m using grep to filter out the various other sensors in range:

platform: command_line
     # Read latest json temperature data from RTL-SDR driven temperature sensor outside.
     # See associated rtlweather service running via systemd
     name: Outdoor Temp
     command: "grep '11752' /home/homeassistant/.homeassistant/weather.data  |tail -n1"                                                                                                                         
     json_attributes:
       - temperature_C
     value_template: '{{ value_json.temperature_C }}'
     unit_of_measurement: "°C"

Boom. Works perfectly.

1 Like