Jump to content

Sonoff Dualr3 met esphome!


 Share
Followers 1

Recommended Posts

  • Beheerders

Van de week de nieuwe Sonoff DualR3 binnen gekregen en heb er gisterenavond mee kunnen spelen.

Na wat onderzoek zojuist de config geschreven voor esphome en werken!

 

image.png

 

Config:

 

substitutions:
  devicename: sonoff_dualr3
  long_devicename: Sonoff DualR3

esphome:
  name: $devicename
  platform: ESP32
  board: esp32dev

wifi:
  ssid: !secret esphome_wifi_ssid
  password: !secret esphome_wifi_password
  power_save_mode: light
  ap:
    ssid: $devicename
    password: !secret esphome_ap_password

captive_portal:
  
api:
  password: !secret esphome_api_password

ota:
  password: !secret esphome_ota_password

web_server:
  port: 80

logger:
  baud_rate: 0

# remove # below to enable ble tracking
#esp32_ble_tracker:

uart:
  rx_pin: RX
  baud_rate: 4800

sensor:
  - platform: wifi_signal
    name: "WiFi Signal $long_devicename"
    update_interval: 60s
#  - platform: cse7766  #The actual chip on the DualR3 is a CSE7761, no driver available yet!
#    update_interval: 5s
#    current:
#      name: "$long_devicename Current"
#    voltage:
#      name: "$long_devicename Voltage"
#    power:
#      name: "$long_devicename Power"
#      id: power
#      on_value_range:
#        - above: 1.0
#          then:
#            - logger.log: "$long_devicename Power above 1.0A"
#        - below: 1.0
#          then:
#            - logger.log: "$long_devicename Power below 1.0A"

output:
  - platform: gpio
    pin: GPIO27
    id: relay1
  - platform: gpio
    pin: GPIO14
    id: relay2

switch:
  - platform: output
    name: "$long_devicename - relay 1"
    output: relay1
    id: sw1
  - platform: output
    name: "$long_devicename - relay 2"
    output: relay2
    id: sw2

status_led:
  pin:
    number: GPIO13
    inverted: yes

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "$long_devicename button"
    on_press:
      - logger.log: "$long_devicename button"
      - switch.toggle: sw1
  - platform: gpio
    pin:
      number: GPIO32
      mode: INPUT_PULLUP
      inverted: True
    name: "$long_devicename switch 1"
    on_press:
      - logger.log: "$long_devicename switch 1"
      - switch.toggle: sw1
  - platform: gpio
    pin:
      number: GPIO33
      mode: INPUT_PULLUP
      inverted: True
    name: "$long_devicename switch 2"
    on_press:
      - logger.log: "$long_devicename switch 2"
      - switch.toggle: sw2

 

Meer informatie op de Home Assistant hobbybob website van Paul en mij ;):

 

The new Sonoff DualR3 is here! - espthings.io

Gebruik je een advertentie blocker? Sluit onze website dan uit. Zonder advertenties kan deze site niet voortbestaan.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Lees alvorens je verder gaat onze Terms of Use en Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.