Hi there,
I am building a 16 Outlet Smart Power Plug built around ESPHome and the 16 Channel Relay Board. Here is where it’s got me. And I think this will work. What I am asking is do you think I should use other components power-wise? Any other thoughts?
BTW, I am using a 12V Relay board as this what I have. Next version will have a 5V Relay board, so it won’t need the buck converter, as I will change the power supply as well to be 220v to 5v.
This is the electronics hookup. I didn’t link all the pins, but you get the idea
This is how half of it actually looks like:
And this is the ESPHome code:
esphome:
name: 16outlet
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "ssid"
password: "password"
fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# I2C basic config used for multiple sensors and IO Expanders
i2c:
sda: D2
scl: D1
scan: True
# Configuration entry for MCP23017 I/O Expander
mcp23017:
- id: 'mcp23017_hub'
address: 0x20
switch:
# Individual outputs for MCP Relays
- platform: gpio
name: "Outlet 1"
icon: mdi:electric-switch
pin:
mcp23017: mcp23017_hub
# Use pin number 1
number: 1
# One of INPUT, INPUT_PULLUP or OUTPUT
mode: OUTPUT
inverted: True
- platform: gpio
name: "Outlet 2"
icon: mdi:electric-switch
pin:
mcp23017: mcp23017_hub
# Use pin number 2
number: 2
# One of INPUT, INPUT_PULLUP or OUTPUT
mode: OUTPUT
inverted: True
And so on for each output
So let me know what you think!