Get Started With BEVRLink 8 Channel Relay - ESP32 manager ESPHOME

Get Started With BEVRLink 8 Channel Relay - ESP32 manager ESPHOME

The example below is only one way how to set up the Relay Module.

In this examples we have connected a ESP32 to the BEVRLink Manager ESP32 V2 with BEVRLink 8 Channel Relay V1 12V. With this relay module board you need the BEVRLink Power Supply 12V 2A.

Optional for a safe setup we recommend to use case for both the manager and relay boards: BEVRLink Cases

Create device in Homeassistant

This assumes that the ESPHome plugin has been installed and configured correctly in homeassistant. ESPHome Installation

1. Go into the ESPHome plugin, create a new device and follow the steps

2. Connect to the device, prepare for first use and connect to wifi

3. Adopt in Home Assistant, follow the popup instructions

4. Prepare the yaml file. Replace wifi and Home Assistant API(needed to connect to home assistant) with the example under the Edit button. API not needed if you just want to use the local web server.

relay.yaml


esphome:
  name: bevrlinkesp32

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Can be used to access the device without home assistant web_server: port: 80 # Enable logging logger: # Enable Home Assistant API api: ota: wifi: ssid: "your_SSID" password: "your_Password" # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Bevrlink Esp32 Fallback Hotspot" password: "HXiVVTIy1hrr" captive_portal: i2c: sda: 21 scl: 22 scan: true id: bus_a # The relay, one id for each board with corresponding address mcp23008: - id: 'relay8_1' address: 0x20 # Each relay and its parameter settings switch: - platform: gpio name: "R1_1" pin: mcp23xxx: relay8_1 number: 0 mode: output: true inverted: false - platform: gpio name: "R1_2" pin: mcp23xxx: relay8_1 number: 1 mode: output: true inverted: false - platform: gpio name: "R1_3" pin: mcp23xxx: relay8_1 number: 2 mode: output: true inverted: false - platform: gpio name: "R1_4" pin: mcp23xxx: relay8_1 number: 3 mode: output: true inverted: false - platform: gpio name: "R1_5" pin: mcp23xxx: relay8_1 number: 4 mode: output: true inverted: false - platform: gpio name: "R1_6" pin: mcp23xxx: relay8_1 number: 5 mode: output: true inverted: false - platform: gpio name: "R1_7" pin: mcp23xxx: relay8_1 number: 6 mode: output: true inverted: false - platform: gpio name: "R1_8" pin: mcp23xxx: relay8_1 number: 7 mode: output: true inverted: false

Two options

5a. Use the homeassistant Edit to add the code and compile (won't work on a low power SBC like Raspberry 3B)

5b. Use a PC

    Install Python 3 with pip

    Open a command terminal

  pip install esphome
  esphome run relay.yaml

6a. the device should now be online in the esphome dashboard and it should be auto discovered by home assistant. Check Notification view

6b. Go to http://bevrlinkesp32.local (or your name:) for the device local web server