Rpi_rf hassio not transmitting

Hi, I have just begun with home automation. I have installed hassio (0.52) on my PI3.
I am now trying to integrate a cheap 433Mhz transmitter by connecting the Data pin to GPIO17 (according to the documentation https://home-assistant.io/components/switch.rpi_rf/)
I have a arduino with a sniffer code and a receiver running just 5cm from the transmitter and I cannot see anything being transmitted.
The configuration I am using is:
switch:

  • platform: rpi_rf
    gpio: 17
    switches:
    bedroom_light:
    protocol: 1
    pulselength: 255
    code_on: 710003

Any idea what can be wrong ?
I do not see anything in the logs files related to the rpi_rf

I have a similar problem with hass docker container running on HypriotOS/ResinOS/Raspbian.
Is there any known solution for this?

The container was started with:

docker run -d -p 8123:8123 \
    --name homeassistant \
    -v /etc/localtime:/etc/localtime:ro \
    -v $EXTERNAL/homeassistant-conf:/config \
    --cap-add SYS_RAWIO \
    --device /dev/mem \
    --link mariadb \
    --restart always \
    homeassistant/raspberrypi3-homeassistant

Without the --cap-add and --device parameters there is a permission error.

Any ideas?

I’ve found a workaround. Here is the documentation for it: https://github.com/escoand/rpi3_codesend

Are there any instructions showing how to include pulselength with the codesend command? Or repetitions etc ?Thanks.

Oh, I have forgotten to mention where I have the codesend binary from…
Please have a look at the comment in this file: https://github.com/ninjablocks/433Utils/blob/master/RPi_utils/codesend.cpp

escoand, thanks for the info. My relays work with the codesend now, without the repetition parameters. I guess it is not defined in the codesend code.

If you want repetition, I replaced the rpi_rf platform with direct calls to the rpi-rf_send python script (the command line wrapper for the library rpi-rf), which I edited to add repetition parameter. You can download the script here: https://raw.githubusercontent.com/nhorvath/rpi-rf/c83cbac1d7e9f4b77c4bae9e22fcba43e31bd957/scripts/rpi-rf_send

I created a bin directory in my /config folder and dropped the script into it.

Then your commands look like:

- platform: command_line
  switches:
    my_rf_switch:
      command_on: /config/bin/rpi-rf_send -p 390 -r 3 9964549
      command_off: /config/bin/rpi-rf_send -p 390 -r 3 9964550

usage: rpi-rf_send [-h] [-g GPIO] [-p PULSELENGTH] [-t PROTOCOL] [-r REPEAT] CODE

Sends a decimal code via a 433/315MHz GPIO device

positional arguments:
CODE Decimal code to send

optional arguments:
-h, --help show this help message and exit
-g GPIO GPIO pin (Default: 17)
-p PULSELENGTH Pulselength (Default: 350)
-t PROTOCOL Protocol (Default: 1)
-r REPEAT Repeat (Default: 10)