fribse
(Kenneths Teknik)
August 7, 2020, 6:53am
1
I’ve gotten one of these very small PCB’s with a 220v relay and an esp01s on it .
According to what I could find, the relay is controlled with GPIO0
So I made a config like this:
substitutions:
device_name: raclette
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifissid
password: !secret wifipw
reboot_timeout: 60min
manual_ip:
static_ip: 10.11.13.99
gateway: 10.11.13.1
subnet: 255.255.255.0
fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name} Hotspot"
password: !secret appw
# Enable Home Assistant API
api:
ota:
password: !secret otapw
time:
- platform: homeassistant
id: homeassistant_time
# Enable logging
#logger:
# baud_rate: 0 #need this to free up UART pins
web_server:
port: 80
auth:
username: !secret webuser
password: !secret webpw
uart:
baud_rate: 115200 # speed to STC15L101EW
tx_pin: GPIO1
rx_pin: GPIO3
# Text Sensor with general information
text_sensor:
- platform: version
name: '${device_name} ESPHome Version'
- platform: wifi_info
ip_address:
name: '${device_name} ip'
ssid:
name: '${device_name} ssid'
sensor:
- platform: wifi_signal
name: '${device_name} WiFi Signal'
update_interval: 60s
accuracy_decimals: 0
- platform: uptime
name: '${device_name} Uptime'
unit_of_measurement: days
update_interval: 300s
accuracy_decimals: 1
filters:
- multiply: 0.000011574
switch:
- platform: gpio
name: '${device_name}'
id: relay
pin: GPIO0
When the esp01s is in the programmer it boots up as it should, but as soon as I mount it in the relay, then it won’t boot. Any ideas out there?
francisp
(Francis)
August 7, 2020, 7:11am
2
It looks like the one from frencks doorbell.
Convert your existing wired doorbell into a smart, WiFi-enabled, Home Assistant compatible doorbell for just $2. Step by step guide, no soldering required, using ESPHome.
Frenck does not use the tx_pin and rx_pin definition
fribse
(Kenneths Teknik)
August 7, 2020, 7:15am
3
That’s the one, thanks I’ll try and look through his setup…
tom_l
August 7, 2020, 7:24am
4
I suspect this might be your problem:
switch:
- platform: gpio
name: '${device_name}'
id: relay
pin: GPIO0
The notes for GPIO 0 state:
GPIO0 pulled up OK connected to FLASH button, boot fails if pulled LOW
Is it pulled Low by the relay board?
fribse
(Kenneths Teknik)
August 7, 2020, 7:36am
5
I wouldn’t think so, as it’s the one controlling the relay as far as I know, normally I would avoid GPIO0, but I can see on Francks code, that also uses GPIO0.
fribse
(Kenneths Teknik)
August 7, 2020, 7:47am
6
Just for the hell of it, I bent GPIO0, so it wouldn’t connect, no change.
sender
August 7, 2020, 8:18am
7
Ok… so don’t ask me why but I found a while ago information about… there is a very small resistor on the board (relayboard). If you remove it (solder) it will boot…
Think it was this link, not sure my Internet is too slow atm.
1 Like
tom_l
August 7, 2020, 8:35am
8
So two problems.
GPIO 0 is shorted to ground and
CH_PD is not pulled high.
Wow. What a POS relay board.
fribse
(Kenneths Teknik)
August 7, 2020, 8:41am
9
wtf, geeeez, they could just have used gpio2, and the problem wouldn’t be there. I’m going to test this out.
francisp
(Francis)
August 7, 2020, 9:15am
13
I was already thinking, why use this relay in a POS (Point of Sale)
tom_l
August 7, 2020, 9:21am
14
You’ve rumbled my game. Using a wifi relay to turn on a card cloner remotely is my side project.
1 Like
fribse
(Kenneths Teknik)
August 7, 2020, 12:25pm
15
I’ve tried the ‘hack’ as described in the video, it get’s the esp01s online, but it won’t pull the relay, so I’m giving up on that board, and I’m getting some of these instead
They are slightly bigger, but geekreit is usually good quality, they use serial coms to pull the relay instead of a GPIO.
I have a few of these working great, only differences I can see between mine and your code is that I don’t have a UART:
section, only the switch on GPIO0 and it is inverted
switch:
- platform: gpio
id: relay
inverted: true
pin: GPIO0
sender
August 7, 2020, 1:17pm
17
I remember something elso from this PITA board…
Thanks,
@MatthewFlamm What unit? I have a few but find it hard to find out “what” to do.
@Troon Yes, dead easy?, but your link is not for me… What device can I use? How and what pins to use?
FWIW, I an not using an RPI… run on a VM. And the “binary input” is needed for e.g. a doorbell, motion sensor (radar), switch somewhere to activate a scene, etc… I would love to have e.g. a VERY simple PCB like below, but then with a NO (Normally Open) input…
[image]
(BTW, it took me HOURS to get above …
See picture, I had to connect 2 pins (see picture - little small metal on the bottom right of the picture) then it worked… but now I prefer the D1 mini…
francisp
(Francis)
August 7, 2020, 1:26pm
18
I have 2 of them, and they work great with Tasmota. But, although they look identical when seen from above, they differ from the one in the video, the way the man in the picture is holding them, mine have a hole in the right down corner.
fribse
(Kenneths Teknik)
August 7, 2020, 5:20pm
19
I’ve tried both with and without, no change. .-(
tom_l
August 7, 2020, 6:05pm
20
How about jumpering GPIO2 to the relay instead of GPIO0 (and adjusting your ESPHome config)?