Dear Home Assistant community,
My name is Artem, and I’m cheer on home automation for a long time . I used a lot of devices from different producers, but mostly I was unhappy.
Many devices have certain problems, such as:
- Proprietary software. This is the biggest headache. We have many incidents when a manufacturer closed access to a device after a certain time, motivating you to buy a new device or use their service.
- Closed API for integrations. There are many devices that have their own apps on Google Play or the App Store, but there is no open protocol for communicating with the Home Assistant. I don’t want to have a million different apps on my phone to turn off the kitchen light.
- Lack of local control. Lights in your toilet should not be controlled by servers in another part of the world. Poor internet connection should not affect the smart home system.
- Batteries and accumulators. When you have one battery-powered device, that’s fine, but when you have a whole house of these devices, so it’s a real challenge to replace batteries. Moreover, batteries are not eco-friendly.
- Long reaction. I have met devices with a very long reaction to events. It was funny when the light turned on after I had already passed the corridor.
- High price. Well, everything is clear here.
I tried to take all these disadvantages into account to find a new solution without these minuses. After that I managed to develop a truly cool solution. So, meet the new hero, It is a Brownie 8IN8R module.
In my experience, I can say that this device covers 80% of smart home needs! Here is a small list of what this device can control:
Now I will tell you about the main technical characteristics:
A heart and soul of the module is ESP32, Brownie 8IN8R has 8 discrete inputs with galvanic isolation and 8 relay outputs at 10A. In addition, the module has an Ethernet port. As practice has shown, wired technologies are more reliable and faster than wireless ones. The Brownie 8IN8R ping over the cable is <1 ms. WI-FI and Bluetooth are also here.
Additionally, there is easy access to the RX and TX outputs for flashing the module.
Now let’s talk directly about the firmware.
There are a lot of interesting projects for ESP32, but I made my choice in favor of ESPHome. Thanks to this project, it is possible to make firmware for Brownie instantly, after that the module is natively integrated into the Home Assistant. In addition, automation can be written in ESPHome, which will speed up sensors and active components interaction. For example, a motion sensor is triggered and the relay to which the light bulb is connected is immediately switched on. Moreover, automations work without the main server. Home Assistant may be unavailable for one reason or another, but this is not a reason to sit without light.
I want to show you a live example of the code at my house. I have 2 garage doors, a motion sensor in the garage and a leak sensor in the service room.
Code
esphome:
name: mh-garage-module
platform: ESP32
board: esp-wrover-kit
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 0
manual_ip:
static_ip: 192.168.1.66
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable Home Assistant API
api:
ota:
web_server:
port: 80
i2c:
sda: 13
scl: 16
id: bus_i2c
pcf8574:
- id: 'pcf8574_hub'
address: 0x20
pcf8575: true
# Individual inputs
binary_sensor:
- platform: gpio
id: mh_garage_right_door_end
pin:
pcf8574: pcf8574_hub
number: 6
inverted: False
mode:
input: true
- platform: gpio
id: mh_garage_left_door_end
pin:
number: 4
pcf8574: pcf8574_hub
inverted: False
mode:
input: true
- platform: gpio
name: "MH Service Room Leak Sensor"
device_class: problem
pin:
pcf8574: pcf8574_hub
number: 7
inverted: False
mode:
input: true
- platform: gpio
name: "MH Garage Motion Sensor"
device_class: motion
pin:
pcf8574: pcf8574_hub
number: 5
inverted: False
mode:
input: true
switch:
- platform: gpio
inverted: true
id: mh_garage_right_switch
internal: true
pin:
pcf8574: pcf8574_hub
number: 14
inverted: False
mode:
output: true
restore_mode: ALWAYS_OFF
- platform: gpio
inverted: true
id: mh_garage_left_switch
internal: true
pin:
pcf8574: pcf8574_hub
number: 15
inverted: False
mode:
output: true
restore_mode: ALWAYS_OFF
cover:
- platform: template
name: "MH Garage Right Door"
device_class: garage
lambda: |-
if (id(mh_garage_right_door_end).state) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
open_action:
- switch.turn_on: mh_garage_right_switch
- delay: 1s
- switch.turn_off: mh_garage_right_switch
close_action:
- switch.turn_on: mh_garage_right_switch
- delay: 1s
- switch.turn_off: mh_garage_right_switch
stop_action:
- switch.turn_on: mh_garage_right_switch
- delay: 1s
- switch.turn_off: mh_garage_right_switch
optimistic: false
- platform: template
name: "MH Garage Left Door"
device_class: garage
lambda: |-
if (id(mh_garage_left_door_end).state) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
open_action:
- switch.turn_on: mh_garage_left_switch
- delay: 1s
- switch.turn_off: mh_garage_left_switch
close_action:
- switch.turn_on: mh_garage_left_switch
- delay: 1s
- switch.turn_off: mh_garage_left_switch
stop_action:
- switch.turn_on: mh_garage_left_switch
- delay: 1s
- switch.turn_off: mh_garage_left_switch
optimistic: false
This is how integration looks like into the home assistant dashboard.
Now let’s talk about the cost. The cost of one module is $ 100. I think this is a decent price for such a multifunctional module.
In my plans:
- Expand the range of devices and their functionality. A module for 16 discrete inputs has already been designed.
- Finish the project website.
- Find a job. My skills: Golang, SQL, HTML and System Adminastrator (Windows). Home Automation systems integrator. 28 years old. Relocation is preffered .