RF outlets Switch Status

Hi All,
I have successfully created my first project RF outlets by following instructions from

Now I am able to control my outlets both from HA and rf remotes now my question is when I turn on the light from HA I see the switch indicator turning ON and light bolt turning yellow and now if I use RF remote to turn my light off I still see the HA status as ON.

Is there any was we can check the status of RF outlet and update the button status accordingly on HA?

1 Like

unfortunately, not…

There is no way to poll the Etekcity outlets but you can use a 433mhz receiver to listen for the remote’s signal and send a corresponding state change to HA. I do this within my system but i use a seperate arduino (via Mysensors.org) for handling all 433mhz Rx/Tx.

1 Like

There is a way, where you don’t need any additional hardware. I am using pilight and it listens to remote’s signal (as @Dwalt has written) and changes the state of the switch accordingly. Check the documentation for pilight.

edit: I’m so stupid. I’ve looked at so many configs I neglected to pay attention to my own stuff. My unit # was incorrect. all is working now.

mind sharing your stuff?

I’ve got pilight installed and running and it’s own web-gui works just fine. i’m using the exact outlets as the OP but I can’t get the on/off to work or read state changes from the remote.

my switches

- platform: pilight
  switches:
    foyer_switch:
      on_code:
        protocol: clarus_switch
        unit: 10
        id: A2
        'on': 1
      off_code:
        protocol: clarus_switch
        unit: 10
        id: A2
        'off': 1
      on_code_receive:
        protocol: clarus_switch
        unit: 10
        id: A2
        state: 'on'
      off_code_receive:
        protocol: clarus_switch 
        unit: 10
        id: A2
        state: 'off'

any help would be appreciated

Just seen your edit. Glad you figured it out :slight_smile: because your code looks fine to me.

Hi,
Just got back to this after busy work schedule.
I got the pilight installed and I am able to use pilight-send and pilight-receive to check my pilight installation.

no I am not sure of all the configurations that are needed to get this working with the outlets, can you please let me know the process for this

I got this sorted out am I am good with using the pilight to update the status of switch by using “on/off_code_receive”

now I am at a point where I have a remote button to turn all my lights on/off and I want all the home-assistant swithches to toggle when I press that remote button

I tried using multiple ID: in the pilight_switch but I get a duplidate id: in error

any thoughts on how to change status on switches based on multiple inputs?

When you say ‘remote button’ do you mean a physical remote? If so you just need to map out that buttons codes and on that on(off)_code_receive change the states of your swtiches in HA.

yes its a physical button which turns on/off all the lights.

I have 4 pilight switches in HA so now when I toggle 4th switch(which sends a all on/off RF code) status for all the switches should be update not just the 4th switch.

something like this should happen
on_code_receive:
protocol: clarus_switch
unit: 28
id: C3**, A2**
state: ‘on’
off_code_receive:
protocol: clarus_switch
unit: 28
id: C3**, A2**
state: ‘off’

I’m still kinda new to HA so I’m thinking there’s a way to update that via script or action but I’ll be honest I’m not really sure how to to do it.

I am new too, I will keep looking into it and share if I have any further updates on this.
Thank you for your assistance

I suggest you use automation to solve your problem. Trigger would be pilight_received event and after the trigger you can do whatever you want in action. In my case, when I press the button on a remote lots of things happen, my example:

# REMOTE BUTTON PRESSED
alias: "Movie time - remote"
initial_state: 'on'
trigger:
  platform: event
  event_type: pilight_received
  event_data:
    protocol: clarus_switch
    uuid: 0000-b8-27-eb-7b7b97
    id: E3
    unit: 4
    state: 'on'
action:
  - service: logbook.log
    data:
      name: "Remote button pressed: "
      message: "Movies and TV Shows"
  - service: script.movie_time

And then my script.movie_time:

  alias: Movie Time
  sequence:
    - alias: Marantz audio system
      service: switch.turn_on
      data:
        entity_id: switch.etekcity4
    - alias: Turn on Hard Drives
      service: switch.turn_on
      data:
        entity_id: switch.etekcity1
    - alias: Turn on Samsung Smart TV
      service: hdmi_cec.power_on
    - delay:
        seconds: 15
    - alias: Select KODI HDMI source
      service: hdmi_cec.select_device
      data:
        device: "raspberrypi"
    - delay:
        seconds: 4
    - alias: Turn on Ambilight
      service: switch.turn_on
      data:
        entity_id: switch.hyperion
    - alias: Start KODI
      service: shell_command.kodi_start

So in your case just use:

service: switch.turn_on
data:
  entity_id: your.entity

To turn on the light you want.