Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all 1486 articles
Browse latest View live

Adjustable Timing

$
0
0

@JayElDubya wrote:

I assume what I’m trying to do is possible but could use a hand figuring it out. I am controlling a fireplace and even if either Wifi or HASS goes down, I would like it to timeout and turn off after a default set time. (I chose 2 hours for now.)
However, when everything is functioning properly I would like to instead timeout the fire based on a motion sensor in the living room (which is attached to a separate esphome contoller because of the physical location of where the signal demarcation point is) and timeout via a user-settable timer via a home assistant input_number sensor.
I created “turn_on_fire” and “turn_off_fire” scripts to do the associated tasking because their are ancillary tasks associated with each (status LEDs that need state changes, the switch (relay) for the fire, logging, state publishing, etc.) and all of that works great. I created a third script called “fire_with_timeout” that calls the turn_on_fire script, has the default 2 hour delay, then calls the turn_fire_off script…which seems to work just fine.
To do the motion timing, I created a global variable called timeout_minutes defaulting to 30 on boot. I also created a homeassistant binary_sensor to pull in the state of that sensor and a template sensor to try and timeout on that user-set value. Everything seems to be working with the exception of the actual templating of the timing. See pertinent yaml below. Unless there’s another way to do this, my problem is templating the “minutes” (don’t even know if I can). If I do “minutes: 30” it works okay (I think) but I would like that to be an adjustable delay via the aforementioned input_number sensor.
The line(s) I am tinkering with is comment out below because they don’t compile (either one). The esphome validator says it expects a float.
Any ideas?

-J

binary_sensor:
  - platform: homeassistant
    id: motion
    entity_id: binary_sensor.living_room_motion
    on_press:
      then:
        - if:
            condition:
              switch.is_on: relay
            then:
              - logger.log:
                  format: "Motion detected while fire on, resetting timer for %f minutes."
                  args: [ 'id(timeout_minutes)']
              - script.stop: fire_with_timeout
              - script.execute: fire_with_timeout
            else:
              - logger.log: "Motion detected but fire is off."
  - platform: template
    id: timeout_template
    lambda: 'return id(motion).state;'
    filters:
      - delayed_off:
          # minutes: !lambda "return id(timeout_minutes);"
          # minutes: !lambda "return id(timeout_minutes).value;"
          # minutes: !lambda "return id(timeout_minutes).state;"
          minutes: 30
    on_release:
      then:
        - if:
            condition:
              switch.is_on: relay
            then:
              - logger.log: "Motion timeout reached while fire on, turning off fire."
              - script.execute: turn_off_fire
            else:
              - logger.log: "Motion timeout reached but fire is off."

script:
  - id: turn_on_fire
    then:
      - switch.turn_on: relay
      - switch.template.publish:
          id: fire
          state: ON
      - homeassistant.service:
         service: light.turn_on
         data: {"entity_id": "light.fp_left_indicator"}

  - id: turn_off_fire
    then:
      - script.stop: fire_with_timeout
      - switch.turn_off: relay
      - switch.template.publish:
          id: fire
          state: OFF
      - homeassistant.service:
          service: switch.turn_off
          data: {"entity_id": "switch.fireplace_fan"}
      - homeassistant.service:
          service: light.turn_off
          data: {"entity_id": "light.fp_left_indicator"}
      - script.stop: fire_with_timeout

  - id: fire_with_timeout
    then:
      - script.execute: turn_on_fire
      - logger.log: "Default timer (2hr) reset"
      - delay: '02:00:00'
      - logger.log: "Default (2hr) timeout reached. Turning off fire"
      - script.execute: turn_off_fire

Posts: 1

Participants: 1

Read full topic


Flash ESPhome Missing Something

$
0
0

@myle wrote:

move from windows 7 to window 10

did this

i see this

after a reboot of the esp32

so turn on termite

i see

anyone got any ideas why HOW to fix

here the ESP code

esphome:
  name: bluetooth200
  platform: ESP32
  board: mhetesp32devkit

wifi:
  ssid: "bla"
  password: "bla"
  
  manual_ip:
    static_ip: bla
    gateway: bla
    subnet: 255.255.255.0
# Enable logging
logger:

# Enable Home Assistant API
api:
  password: 'bla'

web_server:
  port: 80

ota:
  password: 'bla'
  
#Enable Bluetooth scanning for this ESP32
esp32_ble_tracker:
#  scan_interval: 250s
  
sensor:
  - platform: xiaomi_lywsdcgq
    mac_address: 4C:65:A8:DE:D5:FD
    temperature:
      name: "Hall Temperature"
      unit_of_measurement : "°C"
    humidity:
      name: "Hall Humidity"
    battery_level:
      name: "Hall Battery Level"
      unit_of_measurement : "%"

  - platform: xiaomi_lywsdcgq
    mac_address: 4C:65:A8:DF:ED:0C 
    temperature:
      name: "Bedroom Temperature"
      unit_of_measurement : "°C"
    humidity:
      name: "Bedroom Humidity"
      unit_of_measurement : "%"
    battery_level:
      name: "Bedroom Battery Level"

  - platform: wifi_signal
    name: 'Bluetooth Bridge Wifi Signal 200'
    update_interval: 10s
  - platform: uptime
    name: 'Bluetooth Bridge Uptime 200'


time:
  - platform: homeassistant
    on_time:
      - seconds: 0
        minutes: 0
        hours: 4
        days_of_week: MON-SUN
        then:
           - switch.toggle: restartit
      - seconds: 0
        minutes: 0
        hours: 16
        days_of_week: MON-SUN
        then:
           - switch.toggle: restartit
switch:
  - platform: restart
    name: "Bluetooth Restart"
    id: restartit

Posts: 3

Participants: 2

Read full topic

Last_updated only updates if sensor value changes

$
0
0

@marrold wrote:

Hi, I am using ESPHome on an ESP32 with a INA219 and DS18B20 sensor attached, updating every 30 seconds. I can see in the logs they’re sending updates to HA as expected, but within home assistant the last_updated only changes if the sensor value changes, not with each update as I’d expect.

If I simulate a change by heating the DS18B20 and letting it cool for example, it will update last_updated and last_changed every 30 seconds until the temperature stabilises again.

Is this normal? It makes it impossible to check if the data is still fresh.

HA Version: 0.101.3
ESPHome Version: 1.14.2

Posts: 3

Participants: 2

Read full topic

Utility meter ESPhome and POW

$
0
0

@Klagio wrote:

Hi, I have various Sonoff POW flashed with the below code


  - platform: hlw8012
    update_interval: 2s  
    sel_pin: 5
    cf_pin: 14
    cf1_pin: 13
    current:
      name: "Dining room AC Current"
    voltage:
      name: "Dining room AC Voltage"
    power:
      name: "Dining room AC Power"
      id: dining_room_ac_power_plug_power
      filters:
        # Multiplication factor from W to kW is 0.001
    #    - multiply: 0.001
      unit_of_measurement: W
      on_value_range:
        - above: 4.0
          then:
            - light.turn_on: led
        - below: 3.0
          then:
            - light.turn_off: led

  - platform: total_daily_energy
    name: "Dining room AC Total Daily Energy"
    power_id: dining_room_ac_power_plug_power
    accuracy_decimals: 3
    unit_of_measurement: kWh
    filters:
      - multiply: 0.001

Is the sensor
sensor.dining_room_ac_total_daily_energy

the correct sensor to put in Utility meter?


utility_meter:
  energy:
    source: sensor.dining_room_ac_total_daily_energy
    cycle: daily

Posts: 3

Participants: 2

Read full topic

Bricked Sonoff devices after upgrade to 1.14.2

$
0
0

@DeeBeeKay wrote:

For what it’s worth, I run Hassio on a p3B+, and use the esphome plugin for that.

I have a bunch of Sonoff Basics driving lights in my home. When I saw that the 1.14 upgrade was out, I began to upgrade some of my devices (as time permitted). I got about 8 or so done before I noticed that 1.14.2 was out.

Started over at the top of the list again. But, this time, the devices don’t come back. I stopped after doing the second one, having noticed that the first one still hadn’t come back online. She’s dead, Jim. I’m just super grateful I didn’t use the Update All feature, or I’d have a house full of dead devices.

I’m not really sure what to do. Device #1 is in a stupid place in the roof, getting to it will be hard and unpleasant. Device #2 is inside the wall - easier to get to but annoying.

These are both Sonoff Basics, both ESP8266s. Device #1 has a static IP address, Device #2 is on DHCP, but has not requested an IP address. I’ve cycled the power a few times, but they don’t come back. This sucks quite a lot.

I tried to roll back to 1.13.6 by specifying the version to run in the plugin config, and it does seem to download the previous version but then it fails to start - I get a bad gateway when I try to view the ESPHome web interface. By removing the config line that specifies the old version, ESPHome will start, but I don’t dare update any more devices since 1.14.2 seems to be producing bricks.

Any advice?

EDIT: I managed to roll back to 1.14.0. Still dead.

EDIT2: This is interesting. Device #2 has a touch sensor attached to it (light switch), and still responds to it (can turn the light on and off). So the device isn’t actually bricked, but it isn’t communicating on the network. DHCP server hasn’t given it an IP address, so, I dunno what’s up with that. Sadly I have no such luck with Device #1, as there isn’t a switch attached to it - software switching only. But this looks to be a networking issue with 1.14.2, then.

Posts: 5

Participants: 4

Read full topic

Sensor - timestamp last sent image

$
0
0

@mycortex wrote:

I have a esp32-camera (ttgo esp-wrover with PIR) that sends images to HA. It works well, but from time to time it stops sending images, while the sensors keep sending data to HA.

The restart switch fixes this problem every time and makes it send images again.

I want to automate restart of the camera if HA doesn’t receive an image in a given time.

Is there a way to include a sensor in the ESPhome-YAML that sends timestamp for the last image to HA?

I cannot find anything about this on esphome.io

Posts: 3

Participants: 2

Read full topic

CW/WW and Colour Temperature slider support in custom Light Output

$
0
0

@displaced wrote:

Hi all,

I’ve got a bunch of LOHAS-branded LED lamps that I’ve reflashed to ESPHome, trying to replicate their original behaviour with homeassistant.

I successfully identified the GPIO PWM channels by experimenting with Tasmota. It’s a 5 PWM device (R, G, B, ColdWhite, WarmWhite).

A standard setup with ESPHome gives me this behaviour in HASS:

  • ‘Brightness’, ‘Color Temperature’ and ‘White Value’ sliders, and a colour picker
  • Brightness only controls the RGB brightness
  • White Value only controls the White brightness
  • To see colours, I need to set White Value to 0, Brightness to non-0 and pick a colour
  • To see White, I need to set Brightness to 0, White Value to non-0 and adjust Colour Temperature as needed.

This isn’t great - and confuses the hell out of HomeKit and Alexa.

I found a github issue that almost addresses this problem. I used the code that user envy provides here: https://github.com/esphome/feature-requests/issues/212#issuecomment-498036079

Initially, I altered it slightly, using my cold_white channel in place of white in the code. This works how I want, but has no colour temperature support.

So - I’m trying to add colour temperature support to this code, and hoping I can get some help and advice.

Here’s my naive attempt:
https://paste.ubuntu.com/p/JKX93NFF4K/

Unfortunately, the colour temperature slider is non-functional (I think this is because I’m not setting min/max temperature values in the yaml - but I can’t find the right syntax in the yaml file to provide those to a custom output). Also, the Brightness slider has no effect on the white light - looks like cold_white and warm_white are always at max in the calls to set_level.

Any advice greatly appreciated!

Posts: 1

Participants: 1

Read full topic

ESPhome and PCF8574 LCD2004A

$
0
0

@Thomas.dmm wrote:

Hello Everybody

I try to print sensor information on lcd 2004a with pcf 8574 but i have this problem : [E][lcd_pcf8574:028]: Communication with LCD Display failed!

Someone can help me ?

This is my code :

esphome:
  name: station_bureau
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: xxxxxxxxxxxx
  password: xxxxxxxxxxxxx

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

i2c:
  sda: D2
  scl: D1
  scan: True 
  
time:
- platform: sntp
  id: my_time
  
sensor:
  - platform: dht
    pin: D7
    model: dht22
    temperature:
      name: "Sation Bureau Température Ambiante"
    humidity:
      name: "Station Bureau Humidité Ambiante"
    update_interval: 30s 
  - platform: uptime
    name: "Station Bureau Uptime Sensor"
  - platform: wifi_signal
    name: "Station Bureau WiFi Signal"
    update_interval: 30s      

    
binary_sensor:
  - platform: gpio
    pin: D5
    name: "Station Bureau PIR Sensor"
    device_class: motion    
    
display:
  - platform: lcd_pcf8574
    dimensions: 20x4
    address: 0x27
    lambda: |-
      it.print("Hello World!");
#      it.strftime("It is %H:%M on %d.%m.%Y", id(my_time).now());

And This is the log

NFO Successfully connected to station_bureau.local
[12:35:47][I][app:100]: ESPHome version 1.14.2 compiled on Nov 13 2019, 12:35:06
[12:35:47][C][wifi:409]: WiFi:
[12:35:47][C][wifi:277]: SSID: xxxxxxxxxxxxxxx
[12:35:47][C][wifi:278]: IP Address: xxxxxxxxxxx
[12:35:47][C][wifi:280]: BSSID: xxxxxxxxxxxxxx
[12:35:47][C][wifi:281]: Hostname: 'station_bureau'
[12:35:47][C][wifi:285]: Signal strength: -41 dB ▂▄▆█
[12:35:47][C][wifi:289]: Channel: 8
[12:35:47][C][wifi:290]: Subnet: [255.255.255.0](https://l.facebook.com/l.php?u=http%3A%2F%2F255.255.255.0%2F%3Ffbclid%3DIwAR2sqTUmEgMfDQ5d0eT-7-WHiPrxmkHXb1zU0useUV-VRhIzGa5bWJUIN0s&h=AT0xiOx820JwhJQV-dRzNaRzY5IQUB2A9Ybz4qOQlQlOmK8DeGaZRiz-Df5hHPip-9bTqNLLBYMCT5bkh70tdPKktfAIiUyhnZoyzkezsrBZ7kCY6tM7SXzakN7AnB618LXjWCNACwUDj67LyeE)
[12:35:47][C][wifi:291]: Gateway: [10.0.0.1](https://l.facebook.com/l.php?u=http%3A%2F%2F10.0.0.1%2F&h=AT2NY8BIlcKE9YGny0F3WvLIyQcShkYYpzLs-HsGg9emIOIPymf6_WSN3YKBwY90SpSQ68vKCqof93SkDLfF62hWOmGNCYHiAOTSAnpDBAFObGOtknxpQpDg8ZkY-n0rZX08U4U3CVaFuqeOQi8)
[12:35:47][C][wifi:292]: DNS1: [10.0.0.1](https://l.facebook.com/l.php?u=http%3A%2F%2F10.0.0.1%2F&h=AT3oI83s55nX3gIlAX0I1ic2F4VwWt8mw6nIK1ZQ7iHBpu09zwOAExyPt2rt5mQDb8nLCBgU5nsacd2UW2JtznFkuAWMPla_SdvTMyr3oWhDI9iCp70aUdSyFskOnCruL-WyofRieZQrwhYdVQI)
[12:35:47][C][wifi:293]: DNS2: (IP unset)
[12:35:47][C][i2c:028]: I2C Bus:
[12:35:47][C][i2c:029]: SDA Pin: GPIO4
[12:35:47][C][i2c:030]: SCL Pin: GPIO5
[12:35:47][C][i2c:031]: Frequency: 50000 Hz
[12:35:47][I][i2c:033]: Scanning i2c bus for active devices...
[12:35:47][I][i2c:040]: Found i2c device at address 0x27
[12:35:47][C][uptime.sensor:030]: Uptime Sensor 'Station Bureau Uptime Sensor'
[12:35:47][C][uptime.sensor:030]: Unit of Measurement: 's'
[12:35:47][C][uptime.sensor:030]: Accuracy Decimals: 0
[12:35:47][C][uptime.sensor:030]: Icon: 'mdi:timer'
[12:35:47][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Station Bureau PIR Sensor'
[12:35:47][C][gpio.binary_sensor:015]: Device Class: 'motion'
[12:35:47][C][gpio.binary_sensor:016]: Pin: GPIO14 (Mode: INPUT)
[12:35:47][C][logger:175]: Logger:
[12:35:47][C][logger:176]: Level: DEBUG
[12:35:47][C][logger:177]: Log Baud Rate: 115200
[12:35:47][C][logger:178]: Hardware UART: UART0
[12:35:47][C][dht:017]: DHT:
[12:35:47][C][dht:018]: Pin: GPIO13 (Mode: INPUT)
[12:35:47][C][dht:024]: Model: DHT22 (or equivalent)
[12:35:47][C][dht:027]: Update Interval: 30.0s
[12:35:47][C][dht:029]: Temperature 'Sation Bureau Température Ambiante'
[12:35:47][C][dht:029]: Unit of Measurement: '°C'
[12:35:47][C][dht:029]: Accuracy Decimals: 1
[12:35:47][C][dht:029]: Icon: 'mdi:thermometer'
[12:35:47][C][dht:030]: Humidity 'Station Bureau Humidité Ambiante'
[12:35:47][C][dht:030]: Unit of Measurement: '%'
[12:35:47][C][dht:030]: Accuracy Decimals: 0
[12:35:47][C][dht:030]: Icon: 'mdi:water-percent'
[12:35:47][C][lcd_pcf8574:023]: PCF8574 LCD Display:
[12:35:47][C][lcd_pcf8574:024]: Columns: 20, Rows: 4
[12:35:47][C][lcd_pcf8574:025]: Address: 0x3F
[12:35:47][C][lcd_pcf8574:026]: Update Interval: 1.0s
[12:35:47][E][lcd_pcf8574:028]: Communication with LCD Display failed!
[12:35:47][C][ota:029]: Over-The-Air Updates:
[12:35:47][C][ota:030]: Address: station_bureau.local:8266
[12:35:47][C][api:095]: API Server:
[12:35:47][C][api:096]: Address: station_bureau.local:6053
[12:35:47][C][sntp:043]: SNTP Time:
[12:35:47][C][sntp:044]: Server 1: '0.pool.ntp.org'
[12:35:47][C][sntp:045]: Server 2: '1.pool.ntp.org'
[12:35:47][C][sntp:046]: Server 3: '2.pool.ntp.org'
[12:35:47][C][sntp:047]: Timezone: 'CET-1CEST-2,M3.5.0/2,M10.4.0/3'
[12:35:47][C][wifi_signal.sensor:009]: WiFi Signal 'Station Bureau WiFi Signal'
[12:35:47][C][wifi_signal.sensor:009]: Unit of Measurement: 'dB'
[12:35:47][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[12:35:47][C][wifi_signal.sensor:009]: Icon: 'mdi:wifi'
[12:35:51][D][dht:048]: Got Temperature=20.5°C Humidity=51.6%

Posts: 2

Participants: 1

Read full topic


ESPHome does not discover phone using BLE

$
0
0

@mpaneth wrote:

I have just configured an ESP32 using ESPHome with the following configuration

esphome:
name: bluetooth
platform: ESP32
board: esp32doit-devkit-v1

wifi:
ssid: “m-kbridge”
password: “…”

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Bluetooth Fallback Hotspot”
password: “…”

captive_portal:

Enable logging

logger:

Enable Home Assistant API

api:
password: “…”

ota:
password: “…”

esp32_ble_tracker:

binary_sensor:

  • platform: ble_presence
    mac_address: 58:B1:0F:08:5E:77
    name: “Mikes phone”

When I bring my Samsung S9 into proximity (or turn off & on bluetooth, I do not get any discovery of the BLE device.

INFO Reading configuration /config/esphome/bluetooth.yaml…
INFO Starting log output from bluetooth.local using esphome API
INFO Connecting to bluetooth.local:6053 (192.168.0.21)
INFO Successfully connected to bluetooth.local
[23:22:55][I][app:100]: ESPHome version 1.14.2 compiled on Nov 14 2019, 17:24:59
[23:22:55][C][wifi:409]: WiFi:
[23:22:55][C][wifi:277]: SSID: [redacted]
[23:22:55][C][wifi:278]: IP Address: 192.168.0.21
[23:22:55][C][wifi:280]: BSSID: [redacted]
[23:22:55][C][wifi:281]: Hostname: ‘bluetooth’
[23:22:55][C][wifi:285]: Signal strength: -47 dB ▂▄▆█
[23:22:55][C][wifi:289]: Channel: 6
[23:22:55][C][wifi:290]: Subnet: 255.255.255.0
[23:22:55][C][wifi:291]: Gateway: 192.168.0.1
[23:22:55][C][wifi:292]: DNS1: 198.142.152.164
[23:22:55][C][wifi:293]: DNS2: 198.142.152.165
[23:22:55][C][logger:175]: Logger:
[23:22:55][C][logger:176]: Level: DEBUG
[23:22:55][C][logger:177]: Log Baud Rate: 115200
[23:22:55][C][logger:178]: Hardware UART: UART0
[23:22:55][C][esp32_ble_tracker:442]: BLE Tracker:
[23:22:55][C][esp32_ble_tracker:443]: Scan Duration: 300 s
[23:22:55][C][esp32_ble_tracker:444]: Scan Interval: 512 ms
[23:22:55][C][esp32_ble_tracker:445]: Scan Window: 320 ms
[23:22:55][C][esp32_ble_tracker:446]: Scan Type: ACTIVE
[23:22:55][C][ble_presence:011]: BLE Presence ‘Mikes phone’
[23:22:55][C][captive_portal:169]: Captive Portal:
[23:22:55][C][ota:029]: Over-The-Air Updates:
[23:22:55][C][ota:030]: Address: bluetooth.local:3232
[23:22:55][C][ota:032]: Using Password.
[23:22:55][C][api:095]: API Server:
[23:22:55][C][api:096]: Address: bluetooth.local:6053
[23:23:24][D][esp32_ble_tracker:148]: Starting scan…
[23:28:24][D][esp32_ble_tracker:148]: Starting scan…
[23:33:24][D][esp32_ble_tracker:148]: Starting scan…
[23:38:24][D][esp32_ble_tracker:148]: Starting scan…
[23:43:24][D][esp32_ble_tracker:148]: Starting scan…
[23:48:24][D][esp32_ble_tracker:148]: Starting scan…
[23:53:24][D][esp32_ble_tracker:148]: Starting scan…

Can somebody please help identify where I am going wrong.

Mike Paneth
Melbourne Australia

Posts: 1

Participants: 1

Read full topic

ESPHome with DHT22 and 128x32 OLED Display

$
0
0

@Bret_1975 wrote:

Hi everyone,

I’m new to the community, although I have been using Home Assistant now for about a year. I have several home-built Temperature & Humidity sensors utilising the DHT22 and Wemos D1 Mini. These are working really well, but I have developed some small rechargeable units for areas where I have no power available, and I would like to use an OLED display in my enclosure for a quick reference rather than having to carry my phone or tablet everywhere with me.

My current YAML config is as follows:

esphome:
  name: dht22_lounge
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "************"
  password: "************"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Dht22 Lounge Fallback Hotspot"
    password: "************"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "************"

ota:
  password: "************"

# DHT22 Config
sensor:
  - platform: dht
    model: DHT22
    pin: D2
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 30s

My question is, what code do I need to add here to get the OLED display to also output the temp and humidity? I have it working standalone from an Arduino IDE Sketch, but haven’t a clue how to translate it to ESPHome.

Many thanks in advance,
Bret :slightly_smiling_face:

Posts: 8

Participants: 3

Read full topic

Making a custom UART component for my heater

$
0
0

@jms3000 wrote:

I have a vaillant heater which has got a serial interface for communication. By sending serial commands, I can check that values of different sensors. I would like to do that with ESPhome.
I think I have to make a custom component as described in https://esphome.io/custom/uart.html . How often does the loop loop?
How to create 10 sensors with this custom component?

Posts: 1

Participants: 1

Read full topic

Mi Flora battery life

$
0
0

@tom_l wrote:

Does anyone have any experience with the mi flora esphome sensor and how long the battery lasts?

I have one and it lasted 2 months before I had to replace the battery.

Just wondering if this is typical or if my device has an issue.

Posts: 13

Participants: 5

Read full topic

Deep Sleep Help Needed

$
0
0

@D4VEW557 wrote:

Hi all

I am trying to create a simple sketch where by I can put a d1 mini esp32 in to deep sleep for a predetermined time by pressing a switch in home assistant. Once the time has elapsed and the mini wakes up I want to stay awake until the switch is pressed again.

The first bit works fine, the program loads a waiting until the switch is pressed but then the sleep process just cycles.

I think it is because the ‘switch on’ status is stored when the sleep starts so the program thinks the switch is pressed constantly.

Any ideas how to stop this would be gratefully appreciated .

> esphome:
>   name: battery_esp32
>   platform: ESP32
>   board: esp-wrover-kit
> 
> wifi:
>   ssid: ""
>   password: ""
> 
>   # Enable fallback hotspot (captive portal) in case wifi connection fails
>   ap:
>     ssid: "Battery Esp32 Fallback Hotspot"
>     password: ""
> 
> captive_portal:
> 
> # Enable logging
> logger:
> 
> # Enable Home Assistant API
> api:
>   password: ""
> 
> ota:
>   password: ""
>   
>   
> switch:
>   - platform: gpio 
>     pin: 5
>     name: sleep
>     on_turn_on:
>       - deep_sleep.enter: deep_sleep_1
>       - logger.log: "Switch Turned On!"
>     on_turn_off:
>       - logger.log: "Switch Turned Off!"
>       - deep_sleep.prevent: deep_sleep_1
>       
>       
> deep_sleep:
>     id: deep_sleep_1
>     sleep_duration: 20s

Posts: 3

Participants: 2

Read full topic

Disable WIFI completely

$
0
0

@SubOrbit wrote:

I have a couple of esp32s where I do not need/want any WIFI connectivity, I just use ESPhome with automations on the device itself.
Is there any way to disable WIFI?
Currently, I have set the devices in AP mode (omitting ssid and password variables), but that is not ideal…

Posts: 3

Participants: 2

Read full topic

Unable to download ESPHome binary file without restarting hassio first :(

$
0
0

@jschwalbe wrote:

Not sure what’s going on… running hassio with docker. When I create a new ESPHome configuration/device, everything seems to work ok, it compiles fine, but I cannot download the binary until I restart my server via docker restart homeassistant. What gives?
image

Posts: 2

Participants: 2

Read full topic


ESPHOME Lights (fastled) - calibrate percentage brightness

$
0
0

@Linwood wrote:

Just did some fastled strip lights, and it was startlingly easy to get it up and running.

I have one minor tweak needed: They do not even come on visibly until about 15%.

Is there a way to bias, or scale, the brightness scale, to correct for this? E.g. to map say actual 10%-100% to requested 0% to 100%?

I see color correction but that doesn’t seem to quite target this.

Thanks, Linwood

Posts: 1

Participants: 1

Read full topic

`` entities from renamed switch

$
0
0

@edboston wrote:

New to ESPHome and playing around with a NodeMCU to try things out. I have added two GPIO pins to control the on-board LEDs and have that working fine. During this time, I renamed the switch pins and now in the device info, I am seeing two entries for <unknown>. I’m guessing these are from the old pin names since a new <unknown> shows up every time I rename a pin. How do I go about removing these entries?

Posts: 3

Participants: 2

Read full topic

Reading values from vaillant gas heater

Write multiple sensors values to UART

$
0
0

@hmoffatt wrote:

I’d like to get the value of multiple sensors from Home Assistant and write them to the UART in a particular format. Let’s say it’s comma separated text.

I can get the values into ESPHome using homeassistant sensors, but I’m not sure how to write them to the UART. I’ve looked at the UART switch component, the uart.write actions, and the logger.

Would it be best to create a new display device which is just a UART output, similar to the LCD devices? Then the format can be defined with printf in the definition.

Any suggestions most welcome.

Posts: 1

Participants: 1

Read full topic

ESPHome WLED combination?

$
0
0

@prankousky wrote:

Hi everybody,

I am controlling multiple WS2811 and WS2812 led strips with both ESPHome and WLED. Unfortunately, ESPHome has very few “out of the box” light effects; while WLED has many more great light effects, it can only control those leds… ESPHome, however, can also control other things.

Is there a way to combine both projects in one controller? I assume the answer is no, but perhaps somebody knows a way or an alternative that might work for what I am trying to do.

For example, in my living room, I have an ESPHome with a light sensor and a WS2812. Automation goes something like this: if living room door is open and light sensor value is below between 11:00 and 20:45, then turn on . In this scenario, is connected to the same ESPHome that also measures the lux via sensor. is just another light inn the same room.
Then, in the bedroom, I have a WLED connected to a WS2811. This can obviously not measure lux, but instead only control the WS2811. This is totally fine, as I use different automations in my bedroom that don’t necessarily need to rely on an actual lux value (for example, when sun is below horizon and tv is turned on, toggle <wled_bedroom>).

But here is my “problem” or the reason I am looking for a combination of those two projects in one device: I want to build a controller with a lux sensor and an led strip (WS2811) for my parents. The do not have a Home Assistant (nor any other smarthome controller), which means the device itself would have to do all the “work”. By that, I mean that it should both be able to measure lux value and control the led strip but controlling the led strip should be done by WLED (as it has many more effects out of the box).

I am aware that I could just set up Home Assistant on a pi for them, then build on ESPHome for measuring light and a WLED for controlling the led strip, but if there was some way to have it all done by one single device, it’d be much nicer. I am pretty sure that there is no way to run two separate programs on one device (in this case, btw., I am using a nodeMCU v3 as controller and nodeMCU board as power supply), but I have seen so many great projects and ideas in the Home Assistant forums that I could imagine somebody having build something like this and might be able to help :slight_smile:

Thank you for your ideas

Posts: 1

Participants: 1

Read full topic

Viewing all 1486 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>