Discrepancy Between Original Remote and RPI_RF Transmission

I’m trying to diagnose an issue that I’m having in regards to a 433 MHz switch.

Setup: Following @brusc’s videos, I am using the same ZAP switches and 433 MHz transmitter/receivers. I captured the codes from the original remote control using “python3 rfrx.py”. I then placed the on/off codes in HASS as a switch and am able to turn on/off the 433 MHz device using the switches in HASS with 90%+ reliability. Next, I setup pilight such that it would place any button presses from the original remote onto the HASS event bus. I have an automation that reads the event from pilight and updates a sensor status. I am trying to keep the switch state and sensor state matching.

Issue: When I transmit from the original remote, pilight receives the correct information and places it on the HASS event bus. When HASS transmits the same code via RPI_RF, pilight receives a different code, which doesn’t match the original remote’s code. I’m at a loss as to how to get RPI_RF to consistently transmit the same code that the original remote is transmitting.

Original Remote:

{
        "message": {
                "id": "A2",
                "unit": 60,
                "state": "on"
        },
        "origin": "receiver",
        "protocol": "clarus_switch",
        "uuid": "0000-b8-27-eb-4ffabe",
        "repeats": 6
}

RPI_RF Remote:
{
        "message": {
                "id": "F15",
                "unit": 63,
                "state": "off"
        },
        "origin": "receiver",
        "protocol": "clarus_switch",
        "uuid": "0000-b8-27-eb-4ffabe",
        "repeats": 6
 }

Any ideas on how to resolve this? I am using 433 MHz superheterodyne transmitters/receivers connected directly to the GPIO on the RPi, as @brusc has described in his videos.

I am trying to achieve something similar.
The code sniffed by pilight-receive:

{
“message”: {
“id”: “A2”,
“unit”: 20,
“state”: “on”
},
“origin”: “receiver”,
“protocol”: “clarus_switch”,
“uuid”: “0000-b8-27-eb-6d7743”,
“repeats”: 1
}

When inputting the ID “A2” into the pilight-switch in home assistant I get error:

homeassistant.bootstrap: Invalid config for [switch.pilight]: expected int for dictionary value @ data[‘switches’][‘pilight’][‘off_code_receive’][0][‘id’]. Got None
expected int for dictionary value @ data[‘switches’][‘pilight’][‘on_code_receive’][0][‘id’]. Got None.

It seems like home assistant expects an integer as the ID but it is actually a string.
If I take out the ID in my configuration all buttons of the rf remote switch turn on and off my pilight-switch.

@twobeers317 I have the same problem. It’s a bug in HASS, I’ve started a topic about it a few days ago.

An issue on github has also been opened. I hope it gets fixed soon.

1 Like

The problem described in posts 2 and 3 were my original problem. I noticed that the clarus_switch protocol only allowed for integers in the ID, which doesn’t work when the ID is alphanumeric. I worked around that issue by using a “shell_command” in HA to use pilight-send to turn the light on/off.

This particular issue I’m experiencing deals with the detail of the codes that are being sent by RPI_RF versus the original remote. I’m using Pilight-Receive to decipher more details about the codes sent from each transmitter, instead of just the code number, pulselength, and protocol.

Bugfix exists already.

Hi I am working on the same and I am not able to capture the codes form ZAP remotes

I am runnign pilight-receive and pressing the on/off on remote and I dont see anything being captured, can you please let me know what I am doing wrong.

Do you have the clarus_switch portion of pilight installed? If not then you will only be able to see the raw codes.

go back in and rerun the setup.sh and make sure you have the right stuff installed.

I am all set with this thank you
this is due to receiver set to 1 in pilight where I am using 2

think have similar issue

Hi,

I got a 433MHz PIR sensor, and when triggered gives this code to the RMPRO

sgc0ACkNKQ0PKCoNKg0PKCoNDycqDQ8nDycPKCkNKQ0qDSoNDygQJyoNDwABmw8oDygPJxAnKQ0AAAAA

I want to use this command in a receiver that I connected to the PI3 running HASS. But I receive this error.

Do I need to convert the string, or?

17-02-26 09:31:33 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [switch.rpi_rf]: expected int for dictionary value @ data['switches']['pir_entrance']['code_off']. Got 'sgc0ACkNKQ0PKCoNKg0PKCoNDycqDQ8nDycPKCkNKQ0qDSoNDygQJyoNDwABmw8oDygPJxAnKQ0AAAAA'
expected int for dictionary value @ data['switches']['pir_entrance']['code_on']. Got 'sgc0ACkNKQ0PKCoNKg0PKCoNDycqDQ8nDycPKCkNKQ0qDSoNDygQJyoNDwABmw8oDygPJxAnKQ0AAAAA'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.rpi_rf/
17-02-26 09:31:35 ERROR (Thread-12) [homeassistant.components.switch.broadlink] Failed to connect to device.