RFXtrx Installation and how to use - martikainen87/Home-Automation GitHub Wiki

Installation

Main RFXtrx - https://home-assistant.io/components/rfxtrx/ Covers - https://home-assistant.io/components/cover.rfxtrx/ Lights - https://home-assistant.io/components/light.rfxtrx/ Sensors - https://home-assistant.io/components/sensor.rfxtrx/ Switches - https://home-assistant.io/components/switch.rfxtrx/

Enable the transmitter

  • Add the USB device to your host

Start with plugin in the device to your VMware host, then follow this guide for creating persistant USB names. It will guide you on how to add the device to your virtual server and create a specific name for it, that way you could unplug the device and reconnect it without changing the HA configuration.

  • Enable the component in Home Assistant

Open configuration.yaml and add this

rfxtrx:
  device: /dev/rfxtrx

This will tell HA to enable the basic component rfxtrx and use the USB device at /dev/rfxtrx, the symlink name you created in the guide for adding USB devices, if you did not follow that guide you can use

ls -l /dev/ttyUSB*

to find the device, most likely it will be /dev/ttyUSB0 or /dev/ttyUSB1

Adding RFXtrx Sensors

https://home-assistant.io/components/sensor.rfxtrx/

RFXtrx sensors could be devices that measure temperatures, wind, raind meter etc.

Edit your configuration.yaml file with the following

  • replace the sensor line that is pre-defined
sensor:
  platform: yr

with

sensor: !include_dir_list sensors/

Create a new folder called sensors and then a file in it called rfxtrx_sensor.yaml

In the file add the following lines

platform: rfxtrx
automatic_add: true

This will enable the sensor function with rfxtrx and tell HA to automatically add any sensor it finds.

Restart Home Assistant

Configuring the RFXtrx Sensors

Now when your RFXtrx is active and we have enable the automatic add of sensors, any device that is reporting it's status on the 433mhz frequency and that your RFXtrx device is able to communicate with will automatically show up on your HA instance.

Here we have 8 temperature sensors from my home, one thing that is good to remember is that the 433mhz network is open, which means that you can receive information from your neighbors devices, and they can see yours.

Go to the *developer Tools and states http://yourip:8123/dev-state and you will find the sensors with their real names

**Entity:**
sensor.085007000800011079_temperature	
**State:**
27.3
**Attributes**
friendly_name: 085007000800011079 Temperature
Rssi numeric: 7
Battery numeric: 9
Temperature: 27.3
unit_of_measurement: °C

The device will pass through different information depending on what kind of sensor it is, this one only provides temperature, others will show humidity, wind etc.

Adding a sensor and giving it a friendly name

go to the /sensors/rfxtrx_sensor.yaml file and add the following

devices:
  08500701e70080b179:
    name: Freezer
    data_type:
      - Temperature

The ID (08500701e70080b179) comes from the dev-state page, if you are unsure which physical device a sensor in HA is, place in a hot or cold place for a few minutes, when the temperature changes you will know that device id XXX is connected to a specific physical device, put a label on it and place it in your home.

Restart HA and your sensor will now be renamed and easier to identify in the future

Go ahead and identify your sensors and add them to the rfxtrx_sensors.yaml file

Customizing

There are more configurations that can be done to the sensors by using the customize.yaml file

open the customize.yaml file

Add the customization, this will set a friendly name for the entity named sensor.kylskap_temperature and add a custom icon to it.

  sensor.kylskap_temperature:
    friendly_name: Kylskåp
    icon: mdi:fridge