I have two of these esp32dev devices. I only have a few dvices connected to one of them at the moment. a couple of contacts . Is it normal for these to go to sleep? If so how can I stop that from happening?
Thanks
I have two of these esp32dev devices. I only have a few dvices connected to one of them at the moment. a couple of contacts . Is it normal for these to go to sleep? If so how can I stop that from happening?
Thanks
Sorry I must have misunderstood the description of this portion of the forum
Thanks JulianDH I think that deep_sleep.prevent
might be what I want. I don’t ever want it to go to sleep.
That depends. If you are running esphome on your esp32dev you are probably right here. But you just don’t tell us. You also don’t bother to present the minimum amount of information for others to help you @edlentz. At least your (esphome) yaml and probably some logs would be necessary so other forum members can actually help you without tipping totally in the dark and making wild guesses.
You probably also weren’t animated yet to open the link which could really help us helping you (if you actually would read it and act accordingly )
I try again because I have hope in people @edlentz
Try again,
I am using espHome on two esp32dev devices. So far I have three contacts that I am using so far. They are magnetic reed switches on two garage doors to indicate when the door is open or closed. The switches and wiring to the ESP’s has been in service for at least 15 years (Rock solid) So far I run a automation to a siren to play a sound when the door opens. The other morning I opened the door to go to work and the siren was silent. I logged into the HA and ran the automation and the siren sounded. This is why I think the esp went to sleep. This is my first project with HA and ESPHome / ESP32Dev devices. Is it possible the ESP32 went into sleep mode? So here is my code on the esp32
esphome:
name: "node1"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
ota:
wifi:
ssid: "Buffalo"
password: "pnndn1rv7"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-6D33Cc"
password: "ahb7ji5QigwX"
captive_portal:
# Contacts or Buttons
binary_sensor:
- platform: gpio
name: Honda Door Contact
pin:
number: 13
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: true
inverted: true
disabled_by_default: false
- platform: gpio
name: Other Door Contact
pin:
number: 16
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: true
inverted: true
disabled_by_default: false
- platform: gpio
name: Back Door Alarm Contact
pin:
number: 17
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: true
inverted: false
disabled_by_default: false
- platform: gpio
name: Back Doorbell Button
pin:
number: 18
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: true
inverted: false
disabled_by_default: false
- platform: gpio
name: Garage Lites Button
pin:
number: 19
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: true
inverted: false
disabled_by_default: false
# Relay controls
switch:
- platform: gpio
name: "Pool Pump Relay"
pin: 21
- platform: gpio
name: "Honda Door Relay"
pin: 23
- platform: gpio
name: "Other Door Relay"
pin: 25
When did you set this up? Is is a permanent power supply. Go to ESPHome dashboard and run the logs. With the ‘rolling” logs in front of you, open a door. Does it show up in the logs? Try another door. With the logs you can see exactly what your device is doing.
You can also add some sensors like Wi-Fi so you can see the strength of the connection. See ESPHome
The power supply is permanent 5VDC. I connected the contacts to the esp last week. I’ll run the logs with opening doors and report back. The Wifi distance is about 20’. I’ll check it anyway I do not have them setup for a static IP, would that add to reliability?
I do but your goal is to understand what your device is doing before you start inventing solutions.
Thank you for the truncated photo. At least you can see your device and it has a strong signal. Now you need to do the fault finding. Good luck
I opened the live logging in esphome. The contacts are working as expected. I had to start the log twice, the first time had no data. It said it was connected. The second time the data was available
Well, after reprogramming both of the esp32’s (switching the code between them, to make sure Either was good or bad) I ended up changing the static IP of the ESP that was going offline, and it has been steady since. I checked my network with several IP scanners and found no duplicate IPs. Still a mystery ast to what was actually going on, but it is stable at least for now.