Nexa 433MHz using Sonoff RF-bridge modified with the direct hack (and ESPHome)

Hi,
Been struggling to get rid of using my Tellstick (online service) through HA for controlling Nexa devices. Finally I took some time to implement it myself using the ESPHome as a base for the Sonoff RF-bridge (modded with the ‘direct’ hack). I have now pushed it to the main ESPHome repo with a pull-request, i.e. it is not merged yet. However, I would be happy to get some people to test it if you like.

Requirements:

So, when enabling the nexa-dump you can press/send commands that is picked up and printed in the console. The deviceid, group, state, channel and level can be seen there and then added into you configs. Note that it is important to send the message “several times” in order to fully get the message through (see the ‘repeat’ in sample below).

Works with “lights/plugs/remotes and dimmers” (that is what I have tested).

Thank you for testing!

esphome:
   name: nexa_bridge
   platform: ESP8266
   board: esp01_1m

wifi:
   ssid: "YOUR SSID"
   password: "YOUR PASSWD"

# Enable logging
logger:

web_server:
  port: 80

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

remote_receiver:
   pin:
     number: 4
   dump:
   - nexa
   filter: 50us
   idle: 4ms

remote_transmitter:
  pin: 5
  carrier_duty_percent: 100%

binary_sensor:
  - platform: remote_receiver
    name: "Nexa Remote 2 Open"
    internal: yes
    nexa:
      device: 0x4C1C12
      state: 1
      group: 0
      channel: 1
      level: 0
    on_press:
      - binary_sensor.template.publish:
          id: NexaRemote2
          state: ON
  - platform: remote_receiver
    name: "Nexa Remote 2 Closed"
    internal: yes
    nexa:
      device: 0x4C1C12
      state: 0
      group: 0
      channel: 1
      level: 0
    on_press:
      - binary_sensor.template.publish:
          id: NexaRemote2
          state: OFF
  - platform: template
    name: "NexaRemote2 State"
    device_class: window
    id: NexaRemote2

output:
  - platform: template
    id: tilda_slinga_output
    type: binary

    write_action:
      - if:
          condition:
            light.is_on: tilda_slinga_light
          then:
            remote_transmitter.transmit_nexa:
              device: 0x38DDB4A
              state: 1
              group: 0
              channel: 15
              level: 0
              repeat: 5
          else:
            remote_transmitter.transmit_nexa:
              device: 0x38DDB4A
              state: 0
              group: 0
              channel: 15
              level: 0
              repeat: 5

  - platform: template
    id: vardagsrum_dimable_slinga_output
    type: float

    write_action:
      - if:
          condition:
            lambda: return (state > 0);
          then:
            remote_transmitter.transmit_nexa:
              device: 0x19A5470
              state: 2
              group: 0
              channel: 0
              level: !lambda return state*15;
              repeat: 5
          else:
            remote_transmitter.transmit_nexa:
              device: 0x19A5470
              state: 0
              group: 0
              channel: 0
              level: 0
              repeat: 5


light:
  - platform: binary
    name: "Tilda Slinga"
    id: tilda_slinga_light
    output: tilda_slinga_output

  - platform: monochromatic
    name: "Vardagsrum Slinga"
    id: vardagsrum_dimable_slinga_light
    output: vardagsrum_dimable_slinga_output
3 Likes