Skip to content

Instantly share code, notes, and snippets.

View berga's full-sized avatar

Marco Bergantin berga

  • Lutech spa
  • Cagliari, Italy
View GitHub Profile
@vladyspavlov
vladyspavlov / 1ch-relay.yaml
Last active August 29, 2024 10:56
ESPHome configuration for 1-channel ESP32 relay from AliExpress with a 90-250VAC power supply. SZHJW ESP32_Relay_AC X1_V1.1 (303E32AC111)
# https://www.aliexpress.com/item/1005005848983315.html
# Pinout:
# GPIO0 - Button
# GPIO16 - Relay
# GPIO23 - LED
# ESP: ESP32-WROOM-32E (ESP32-D0WD V3, rev. 3.1)
substitutions:
name: 1ch-relay
friendly_name: 1CH Relay
@berga
berga / dingtian-4ch.yaml
Created August 29, 2024 10:48 — forked from vladyspavlov/dingtian-4ch.yaml
ESPHome config for Dingtian 4CH Relay (dtwonder DT-R004) + Modbus NPN IO extender module
esphome:
name: dingtian-4ch
friendly_name: Dingtian 4CH
comment: "ESP32-D0WD v1.0"
# Change NPN module modbus speed to 19200
# Baud rate corresponds to the number: 0: 1200 1: 2400 2: 4800 3: 9600 4: 19200
#on_boot:
# ## configure controller settings at setup
# ## make sure priority is lower than setup_priority of modbus_controller
# priority: -100