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

Scollting text with random phrases and PIR activated - max7219digit - Wemos D1 - ESPHOME

$
0
0

Hi,

I have built a little door sign with a max7219digit matrix display (4 segments) and Wemos D1 controller.

I want to show a random text, every time someone steps in front of the door. The text variables are entered from a HA dashboard.

So far I managed to show one line of text; I am struggeling with two issues:

  1. only show 1 (out of 4 possible) string at a time
  2. have the display active with a timeout.
  3. I can’t get the output value of the photo resistor converted right into a type that the it.intensity method accepts.

about #1: with the code below, the text randomly jumps while scrolling through all possible variables.

about #2: how can I build a timeout function that turns the display off after x seconds once activated. right now, it just stays active as long as someone is standing in front of the sensor.

about #3: what method do I need to use on the id(adc_val).state) in order to cast a decimal ( I suppose) value type? c_str fails with an exception.

Maybe these are all noob questions, however, this is an early journey on HA and ESPhome for me…

Any help or suggestions is appreciated.

TY

this is the code I have:

# https://gist.github.com/debsahu/0ad5e1de664763e84994cc3a4a5d5dc0
# (original source)
esphome:
  name: veneer_display
  platform: ESP8266
  board: d1_mini

wifi:
  networks:
  - ssid: !secret WiFissid
    password: !secret WiFipassword
  power_save_mode: high
  fast_connect: true

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Veneer Display Fallback Hotspot"
    password: !secret WiFipassword
  

web_server:
  port: 80

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
#  password: !secret esphome_haapi_pass

ota:
  password: !secret espOta


binary_sensor:
  - platform: gpio
    pin: D2
    name: "Door Sensor"
    id: door_sensor
    device_class: motion

time:
  - platform: homeassistant
    id: homeassistant_time

spi:
  clk_pin: D5  # D5 is connected to CLK of MAX7219
  mosi_pin: D7 # D7 is connected to MOSI of MAX7219

display:
  - platform: max7219digit
    cs_pin: D8 # D8 is connected to CS of MAX7219
    num_chips: 4
    intensity: 3
    scroll_speed: 100ms
    update_interval: 100ms
    lambda: |-
      std::string doortxt_1 = id(doortxt1).state.c_str();
      std::string doortxt_2 = id(doortxt2).state.c_str();
      std::string doortxt_3 = id(doortxt3).state.c_str();
      std::string doortxt_4 = id(doortxt4).state.c_str();
      std::string door_txt[4] = {doortxt_1,doortxt_2,doortxt_3,doortxt_4};
      int v1 = rand() % 4 + 1;
      it.printf(0, 0, id(digit_font), TextAlign::TOP_LEFT, "%s", door_txt[v1].c_str());
      it.intensity(atoi(id(adc_val).state));
      it.scroll_left();
      static int coun = 0;
      if (id(door_sensor).state) {
        it.turn_on_off(true);
      } else{
        it.turn_on_off(false);
      }
      
font:
  - file: "Amiko.ttf"
    id: digit_font
    size: 8

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "Veneer Display IP Address"
    ssid:
      name: "Veneer Display Connected SSID"
    bssid:
      name: "Veneer Display Connected BSSID"
  - platform: homeassistant
    name: "Door Txt1"
    id: doortxt1
    entity_id: input_text.door_txt_1

  - platform: homeassistant
    name: "Door Txt2"
    id: doortxt2
    entity_id: input_text.door_txt_2

  - platform: homeassistant
    name: "Door Txt3"
    id: doortxt3
    entity_id: input_text.door_txt_3

  - platform: homeassistant
    name: "Door Txt4"
    id: doortxt4
    entity_id: input_text.door_txt_4
   
  - platform: homeassistant
    name: "HA Brightness"
    id: habri
    entity_id: input_number.veneer_bri
    
sensor:
  - platform: wifi_signal
    name: "Veneer Display WiFi Signal Sensor"
    update_interval: 60s
  - platform: uptime
    name: "Veneer Display Uptime Sensor"
  - platform: adc
    id: adc_val
    pin: A0 # A photoresistor is connected to 3.3V and A0, A0 is connected to GND with 10k resistor
    name: "Veneer Display Brightness"
    update_interval: 10s
    unit_of_measurement: "adc"
    filters:
      - multiply: 3.3
      - calibrate_linear:
          - 0.0 -> 0.0
          - 3.3 -> 15

1 post - 1 participant

Read full topic


Control the speed of a water pump

$
0
0

Good Evening,

Could someone help me with my solar project. I want to be able to control the speed of a water pump depending on the temperature.

The pump I have is Seaflo 41 Series DC Water System Pump 12V 12.5 LPM 35 PSI

I have made it switched on/off with a relay connected to an Arduino configured with esphome.

I want to take this a step further and get it to HIGH / Medium or Low.
Do I need some additional components?

I have tried a Mosfet driver but these seem to burn out.

also tried a different one still the same results.

any help would be much appreciated.

1 post - 1 participant

Read full topic

Serial2MQTT

$
0
0

Hello.
I know it is a little off topic, but I have seen, that several people want to control a simple unit ( Heater, Solar Charger, … ) that has a serial port.

I think, the best solution is, that one could use ESPhome with a simple serial2mqtt interface. That way, you can easily integrate the hardware into almost everything and still use the ESPhome goodness for other stuff.

Since I am stuck with that UART interface in ESPhome, I have created a ticket for a solution. Perhaps you guys can take a look at it an help. This would open up a whole lot of new sensors for Home Assistant!

Thanks
Oliver

6 posts - 3 participants

Read full topic

Messed up initial flash, fallback AP is not available

$
0
0

First time ESPHome flasher here. I was trying to install ESPHome on a Sonoff Mini, but i have messed up the network config in the .yaml file - exchanging static ip with default gateway and not putting wifi SSID and password in apostrophes. So now my sonoff mini is not connecting (obviously), but fallback wifi should still be seen. However its not.

Is there any way how to fix this without serial flashing?

Here’s the relevant parts of my .yaml file:

esphome:
  name: sonoff_mini_backyard
  platform: ESP8266
  board: esp01_1m

wifi:
  networks:
  - ssid: wifi
    password: password
    manual_ip:
     gateway: 192.168.50.82
     subnet: 255.255.255.0
     static_ip: 192.168.50.1

#Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: 'Sonoff Mini Back'
    password: 'password'

captive_portal:

# Enable web server
web_server:
  port: 80

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

3 posts - 2 participants

Read full topic

Python automations with esphome

$
0
0

Hi, I have just implemented my first HA/esphome project: a simple temperature and humidity sensor. Now to play around, I would like to add a few automation.
I was thinking of writing a script in python (the language I’m most comfortable with) that sends me a message on telegram when the temperature gets below a certain temperature (in case I let the window open or something).
Is this possible with the esphome automations?

I was also wondering where the recorded values get stored. Is there a way to query them to play around?

3 posts - 3 participants

Read full topic

SOLVED ESPHome compile error

$
0
0

Hey together, I´m a newbie in Home Assistant. I got myself a Raspberry Pi 4 for Christmas and startet a few weeks ago with ESPHome. I installed Home Assistant Supervised because I also run Boinc and Pi-Hole on my overclocked Pi. After I wrote the script for my ESP32 I discovered that I couldn´t compile the code. It said that there are some libraries missing. I tried to install the missing libraries manual, but it failed. A friend also got a Pi for Christmas and installed Home Assistant directly with the image from the website and he didn´t have any problems. So I sent him my file and he compiled it successfully for me, so there was no problem with my file. A few days later he also want to install Pi-Hole. He did everything as me with one exception: He restored his Home Assistant with a backup. And now his ESPHome can compile!! So I also installed Home Assistant new from the image and configured nothing except ESPHome. Then I backed up only the ESPHome setting. Next I installed Home Assistant Supervised on Raspberry Pi OS 64bit again and started with the restored backup. Now everything works perfect. I write this post because I searched a lot about this problem and found out that this is a common thing with ESPHome on a Supervised install of Home Assistant. Maybe this workaround can help you. Best wishes from Bavaria.

1 post - 1 participant

Read full topic

Configuring ESPhome independent thermostat with rotary encoder to adjust target temperature

$
0
0

Hello fellow tinkerers,

I am having a hard time understanding lambdas and other complex functions.

After my SD card got corrupted and all of my HA ecosystem crashed for several days, I realised that I need to make my thermostat more autonomous, so I decided to move the thermostat functionality from my HA sever to my ESPhome node, so that in the event of server failure, the thermostat will retain at least some basic functionality.

My plan is to use a Lolin NodeMCU (ESP8266 based), a DH22 sensor to act as temperature sensor, a generic rotary encoder (https://esphome.io/components/sensor/rotary_encoder.html) to adjust target temperature, and a single channel relay to control my gas heater.

The question is, how do I use the rotary encoder to adjust the thermostat climate controller’s (this one: https://esphome.io/components/climate/thermostat.html) target temperature?

Help appreciated! Thanks in advance!

1 post - 1 participant

Read full topic

How to set min brightness for CWWW platform?

$
0
0

Hi!
I’m converting my Xiomi Philips Zhirui Downlight to use ESPHome. It uses WROOM-02 chip and I 2x PWM channels to control the colors (cold and warm white). The light is working fine, I can set the brightness and color temperature in HA without any problem. The only thing that I need is to setup the minimum brightness. Is that possible?
For instance, in HA entity item, the minium brightness to turn the light ‘on’ should be 45% of the slider. I mean, anything below 45%, the light is off…so 45% on HA slider should be 0% actually.
I have tryied to apply “min_power” to PWM outputs (individually), but this didn’t worked, since it affect the temperature directly. If I set min_power to 0.45 for channel “A”, when I switch the colors, the channel A color stay ‘on’ at minimum level (which shouldn’t). So I guess I can’t use min_power for individual channels.

Any tip?

This is my current working code:

substitutions:
  hostname: 'xiaomilight'
esphome:
  name: $hostname
  platform: ESP8266
  board: esp_wroom_02
  board_flash_mode: dout
  #includes: 
  #  - xiaomi_light.h

web_server:
  port: 80
wifi:
  #domain: '.lan'
  networks:
  - ssid: 'Skynet'
    password: 'k4hvd1212ca83'
  manual_ip:
    static_ip: 192.168.22.62
    gateway: 192.168.22.1
    subnet: 255.255.255.0    

logger:
  level: DEBUG
  esp8266_store_log_strings_in_flash: False

api:

ota:

output:
  - platform: esp8266_pwm
    pin: GPIO12
    frequency: 5000 Hz
    id: out_cw
    
  - platform: esp8266_pwm
    pin: GPIO15
    frequency: 5000 Hz
    id: out_b

light:
  - platform: cwww
    name: "Livingroom Lights"
    cold_white: out_cw
    warm_white: out_b
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K
    constant_brightness: true

1 post - 1 participant

Read full topic


Setting static IP for ESPHome devices advised?

$
0
0

I have 10+ ESPHome devices (and growing!) that communicate with HA. I’ve heard folks recommend setting a static IP for the devices instead of relying on the routers DHCP to assign.

It seems though that ESPHome/HA is using mDNS to find the device, i.e. device_name.local - If that’s the case then it doesn’t really matter what IP is assigned to it?

What am I missing/Change my mind?

4 posts - 3 participants

Read full topic

ESPHome crashes and gets stuck on reboot loop only after adding a few certain lines of code

$
0
0

I have a NodeMCU loaded with ESPHome that I use to manage and automate the filling and pumping of water between the 2 water tanks in my house. I also use it to control several lights that I have in the yard.

The YAML is pretty long, reaching 744 lines. I program all the automations locally on ESPHome so that if home assistant is down, the whole automation system is uninterrupted. Getting the automation right is a process of trial, error, and constant revisioning so I keep adding new features to the YAML every few days.

The problem began when I added some new features to the YAML. After finishing compiling, the upload process failed (update was VIA OTA). I then plugged the NodeMCU directly to the HA server and managed to update it successfully. The subsequent updates would only be succesful if it’s plugged directly to the server. It wouldn’t work via OTA anymore.

Then, the next few days after that as I’m adding more features, after compiling and and successfully uploading, the NodeMCU is stuck at a reboot loop, and the logs via the serial monitor showed something that after doing a quick search tells me that the ESPHome had crashed because after a few moments after booting the logger started showing “--------------- CUT HERE FOR EXCEPTION DECODER ---------------”.

Here’s the complete error log (cropped to just show the exception decoder):

[15:52:50]
[15:52:50]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[15:52:50]
[15:52:50]Exception (29):
WARNING Exception type: unknown
[15:52:50]epc1=0x40229bb6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000008 depc=0x00000000
WARNING Decoded 0x40229bb6: esp8266::MDNSImplementation::MDNSResponder::stcMDNS_RRAnswer::stcMDNS_RRAnswer(esp8266::MDNSImplementation::MDNSResponder::_enuAnswerType, esp8266::MDNSImplementation::MDNSResponder::stcMDNS_RRHeader const&, unsigned int)
WARNING Decoded 0x40229bb6: esp8266::MDNSImplementation::MDNSResponder::stcMDNS_RRAnswer::stcMDNS_RRAnswer(esp8266::MDNSImplementation::MDNSResponder::_enuAnswerType, esp8266::MDNSImplementation::MDNSResponder::stcMDNS_RRHeader const&, unsigned int)
[15:52:50]
[15:52:50]>>>stack>>>
WARNING Found stack trace! Trying to decode it
[15:52:50]
[15:52:50]ctx: sys
[15:52:50]sp: 3fffe9f0 end: 3fffffb0 offset: 0190
[15:52:50]3fffeb80:  3fffebb0 3fffec50 3fffecb2 00000004  
[15:52:50]3fffeb90:  3fff20c0 3fffeddc 00000000 4022e9ac  
WARNING Decoded 0x4022e9ac: operator new(unsigned int)
[15:52:50]3fffeba0:  3fffb6c4 3fffeddc 3fff20c0 4022ae94  
WARNING Decoded 0x4022ae94: esp8266::MDNSImplementation::MDNSResponder::_readRRAnswer(esp8266::MDNSImplementation::MDNSResponder::stcMDNS_RRAnswer*&)
[15:52:50]3fffebb0:  3a30612b 323a3831 37353a38 3a66373a  
[15:52:50]3fffebc0:  66403936 3a303865 3132613a 38323a38  
[15:52:50]3fffebd0:  663a6666 3a373565 39366637 70615f0e  
[15:52:50]3fffebe0:  2d656c70 64626f6d 04327665 7063745f  
[15:52:50]3fffebf0:  636f6c05 00006c61 00000000 00000000  
[15:52:50]3fffec00:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec10:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec20:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec30:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec40:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec50:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec60:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec70:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec80:  00000000 00000000 00000000 00000000  
[15:52:50]3fffec90:  00000000 00000000 00000000 00000000  
[15:52:50]3fffeca0:  00000000 00000000 00000000 00000000  
[15:52:50]3fffecb0:  00210047 00008001 00000078 40220012  
WARNING Decoded 0x40220012: WiFiClient::connect(IPAddress, unsigned short)
[15:52:50]3fffecc0:  3fff20c0 3fffbc24 00000001 402288a6  
WARNING Decoded 0x402288a6: esp8266::MDNSImplementation::MDNSResponder::_parseResponse(esp8266::MDNSImplementation::MDNSResponder::stcMDNS_MsgHeader const&)
[15:52:50]3fffecd0:  00000000 00000000 00000000 00000000  
[15:52:50]3fffece0:  00000000 00000000 00000000 00000000  
[15:52:50]3fffecf0:  00000000 00000000 00000000 00000000  
[15:52:50]3fffed00:  00000000 00000000 00000000 00000000  
[15:52:50]3fffed10:  00000000 00000000 00000000 00000000  
[15:52:50]3fffed20:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed30:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed40:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed50:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed60:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed70:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed80:  00000000 00000000 00000000 00000000  
[15:52:51]3fffed90:  00000000 00000000 00000000 00000000  
[15:52:51]3fffeda0:  00000000 00000000 00000000 00000000  
[15:52:51]3fffedb0:  00000000 00000000 00000000 00000000  
[15:52:51]3fffedc0:  00000000 00000000 00000000 00000000  
[15:52:51]3fffedd0:  00000000 00000000 3f000001 00000000  
[15:52:51]3fffede0:  0000000a 3fffee80 3fffee30 4022aff4  
WARNING Decoded 0x4022aff4: esp8266::MDNSImplementation::MDNSResponder::_readMDNSMsgHeader(esp8266::MDNSImplementation::MDNSResponder::stcMDNS_MsgHeader&)
[15:52:51]3fffedf0:  40258400 3fffee80 3fffee80 000014e9  
WARNING Decoded 0x40258400: ieee80211_phy_type_get
[15:52:51]3fffee00:  3fff28c4 3fffb544 3fff20c0 40228984  
WARNING Decoded 0x40228984: esp8266::MDNSImplementation::MDNSResponder::_parseMessage()
[15:52:51]3fffee10:  00000000 00000000 00000000 00000000  
[15:52:51]3fffee20:  00000000 00000000 00000000 40244b60  
WARNING Decoded 0x40244b60: dns_call_found at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/dns.c:996
[15:52:51]3fffee30:  00210000 00070000 00030000 40100b08  
WARNING Decoded 0x40100b08: ets_post
[15:52:51]3fffee40:  3fff1120 3fffb544 3fff20c0 40228d01  
WARNING Decoded 0x40228d01: esp8266::MDNSImplementation::MDNSResponder::_process(bool)
[15:52:51]3fffee50:  40000069 00290b8e 3fff2cbc 40228d1c  
WARNING Decoded 0x40228d1c: esp8266::MDNSImplementation::MDNSResponder::_callProcess()
[15:52:51]3fffee60:  00000011 00000001 00000010 40232f5f  
WARNING Decoded 0x40232f5f: std::_Function_handler<void (), std::_Bind<std::_Mem_fn<bool (esp8266::MDNSImplementation::MDNSResponder::*)()> (esp8266::MDNSImplementation::MDNSResponder*)> >::_M_invoke(std::_Any_data const&)
[15:52:51]3fffee70:  000000b0 00000000 00000020 40220590  
WARNING Decoded 0x40220590: UdpContext::_s_recv(void*, udp_pcb*, pbuf*, ip4_addr const*, unsigned short)
[15:52:51]3fffee80:  3fffb576 00000000 3fffa13c 3fffb544  
[15:52:51]3fffee90:  3fffb576 00000000 3fffa13c 40247980  
WARNING Decoded 0x40247980: udp_input at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/udp.c:404
[15:52:52]3fffeea0:  000014e9 3fff2804 3fff2804 3fff300c  
[15:52:52]3fffeeb0:  00000000 00000000 00000020 3fff28b4  
[15:52:52]3fffeec0:  3fff2804 3fffb562 3fffb544 4024c8bc  
WARNING Decoded 0x4024c8bc: ip4_input at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1461
[15:52:52]3fffeed0:  00000014 3fff2804 00000167 3fff300c  
[15:52:52]3fffeee0:  00000000 3fff2f6c 00000020 40101617  
WARNING Decoded 0x40101617: free
[15:52:52]3fffeef0:  4025eb30 3fff29cc 3fff2f6c 3fff300c  
WARNING Decoded 0x4025eb30: ppRecycleRxPkt
[15:52:52]3fffef00:  00000008 3fff2804 3fffb544 40243779  
WARNING Decoded 0x40243779: ethernet_input_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c:188
[15:52:52]3fffef10:  3fffdc80 3fff2f6c 3fff29cc 40243598  
WARNING Decoded 0x40243598: esp2glue_ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c:469
[15:52:52]3fffef20:  40268fee 3fff2f6c 3fff29cc 40268fff  
WARNING Decoded 0x40268fee: ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c:365
WARNING Decoded 0x40268fff: ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c:373
[15:52:52]3fffef30:  3fffb554 3fffb544 00000000 3ffe85c4  
[15:52:52]3fffef40:  4025e75b 00000000 3fff29cc 402647f3  
WARNING Decoded 0x4025e75b: ppPeocessRxPktHdr
WARNING Decoded 0x402647f3: ets_snprintf
[15:52:52]3fffef50:  40000f49 3fffdab0 3fffdab0 40000f49  
[15:52:52]3fffef60:  40000e19 00000005 00082700 00000000  
[15:52:52]3fffef70:  3fffefc0 aa55a

After rolling back to the previous version before the last revision that made it crash, the ESPHome worked like normal. This is problematic because I’m not able to add new features anymore.

I am using this NodeMCU, the one with 4MB of memory and uses the CP2102 (not CH340) usb chip.

I tried uploading the same code to a Wemos like this one, but the serial monitor showed the same error.

At this point, I’m thinking that I’m reaching the end of what my wemos or NodeMCU is capable of in terms amount of lines of code. I could be wrong with my theory though, so feel free to correct me. It could be just a memory issue (4MB is not enough), or this is as far as an ESP8266 could go in terms of processing power. So I’m thinking of 2 options here:

  1. Get an ESP8266 with bigger memory (16MB or 32MB)
  2. Upgrade to ESP32

Which option would you guys think should avoid the crashes? If it’s upgrading to ESP32, would it be necessary to get the one with bigger memory than just 4MB?

And just 1 more question: Do you have any recommended ESP32 boards that would work stably with ESPHome? I’m thinking of getting this one:

Thanks guys!

2 posts - 2 participants

Read full topic

How to configure ESPHome mqtt sensor to show OFF when unavailable?

$
0
0

Hello, I have simple PIR sensor that turns power on ESP8266 and sends mqtt state “on”. Then it cuts off power to ESP, so in Home Assistant it becomes “unavailable” after some time. But I would prefer to show sensor state as “off”, because in this case unavailable means “off”. How the sensor would be configured in configuration.yaml please? It is simplest PIR sensor - just to connect ESP power to PIR out pin. Thank you!

1 post - 1 participant

Read full topic

Fan control 0-10V

$
0
0

I’m trying to control my home ventilation system using esphome. This system can be controlled using 0-10V input.

I bought a module (see picture below) that should convert the PWM signal to 0-10V. But it’s not working, and I don’t know what I’m doing wrong.

I only get 10V output, this doesn’t change when I modify the settings in ESPHome/HomeAssistant. This module is powered by 24V DC.

In ESPHome I have the following sketch (ESP8266 board):

output:
  - platform: esp8266_pwm
    pin: D0
    frequency: 1000 Hz
    id: ventilatie_output

fan:
  - platform: speed
    output: ventilatie_output
    name: "Ventilatie Fan"

I found the following info about connections:
|VCC|DC 12 V-30 V|
|GND|Grond|
|PWM|Positieve van PWM ingangssignaal|
|GND|Negatieve van ingangssignaal|
|VOUT|Uitgangsspanning 0-10 V|
|GND|Uitgangsspanning Grond|

So I connected D0 to the PWM connection and measured between VOUT and GND 10V with my multimeter

1 post - 1 participant

Read full topic

BLe battery monitor

$
0
0

Hello,

I have en bike with a battery monitoring with Bluetooth, there is no encryption on it and the app connects automaticly.

i have now a esp32 with ble tracker and is see the device.
But cant find out how to get the information in home assistant.

type o[12:28:34][D][esp32_ble_tracker:148]: Starting scan...
[12:28:37][D][esp32_ble_tracker:544]: Found device 94:E3:6D:98:54:95 RSSI=-89
[12:28:37][D][esp32_ble_tracker:565]:   Address Type: PUBLIC
[12:28:37][D][esp32_ble_tracker:567]:   Name: 'BLE-VoltageCheck'
[12:28:37][D][esp32_ble_tracker:569]:   TX Power: 2
[12:28:37][D][esp32_ble_tracker:569]:   TX Power: 2r paste code here

ESP config now, i see the device in Hass and if it is present.

esp32_ble_tracker:
binary_sensor:
  - platform: ble_presence
    mac_address: 94:E3:6D:98:54:95
    name: "Motor Accu"

1 post - 1 participant

Read full topic

Esphome devices unreachable for hassio

$
0
0

today i updated my whole hassio to the latest version.
Now all my esphome devices are offline. I tried with status_use_pin: true and they are back online again in esphome.
But all entities in hassio are still offline. When i add a esphome ip adress by manually adding the ip into the esphome integration, nothing happens, the blue circle keeps spinning.

What can i do?
I am running HA and ESPhome in docker, esphome is in host mode.

ping the esphome.local name in putty is working ok

64 bytes from keukenlampen.lan (192.168.1.121): icmp_seq=1 ttl=255 time=28.9 ms
64 bytes from keukenlampen.lan (192.168.1.121): icmp_seq=2 ttl=255 time=2.06 ms

1 post - 1 participant

Read full topic

Get sensor status on TFT

$
0
0

Hello everyone,
I am totally new beginner with ESP and MQTT. I have been running with Home Assistant for a couple of years now and thought I would try to make something new smart …
I have purchased the following components that I would use to be able to display a sensor status on from Home Assistant.

I have tried as a test to paste the following to my .yaml file but getting the message “Platform not found: 'display.ili9341”

esphome:
  name: test_2
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "WIFI"
  password: "PASS"


mqtt:
  broker: 'IP'
  username: 'user'
  password: 'password'
  
captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: password"
ota:
  password: "password"
  
i2c:
  sda: D0
  scl: D1

display:
  - platform: ili9341
    model: TFT 2.4
    cs_pin: 14
    dc_pin: 27
    led_pin: 32  ### see note below ###
    reset_pin: 33

    lambda: |-
      it.fill(COLOR_BLACK);
      it.print(0, 0, id(my_font), id(my_red), TextAlign::TOP_LEFT, "Hello World!");

Hope some of you can guide me the right way, thought I have searched the internet for help.

1 post - 1 participant

Read full topic


Change USB device in espHome programming

$
0
0

I am using the esphome add-on and I want to use the USB programming from the the addon. It brings up the wrong serial device. I need to change it to ttyUSB0. How/where can I do that? It chose another serial device which is my Zwave USB I think. Any help appreciated. :thinking:

1 post - 1 participant

Read full topic

L293D to control an electovalve

$
0
0

Hi all,

I’m try to build a system to control a valve bistable.
A valve bistable need an impulse (at leat 50ms) to open the valve, an opposite impulse to close the valve.
I’m using a L293D that works fine. Now want to show on HA a single switch that can turn on GPIO and turn off the other one. Any example?

Thanks in advance!
Filippo

1 post - 1 participant

Read full topic

SCD30 "Measurement Initialization failed!"

$
0
0

I am trying to get an SCD30 sensor to work with ESPHome, but I’m always getting the message “Measurement Initialization failed!”. I got the sensor to work with an Arduino sketch with the same wiring.

Here’s my configuration:

esphome:
  name: scd30
  platform: ESP32
  board: node32s

wifi:
  ssid: "My_SSID"
  password: "My_Password"

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

captive_portal:

# Enable logging
logger:

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

ota:
  password: "some_password"
  
i2c:
  id: bus_a
  sda: GPIO21
  scl: GPIO22
  scan: True
  frequency: 50kHz

sensor:
  - platform: scd30
    address: 0x61
    i2c_id: bus_a
    automatic_self_calibration: true
    co2:
      name: "Workshop CO2"
      accuracy_decimals: 1
    temperature:
      name: "Workshop Temperature"
      accuracy_decimals: 2
    humidity:
      name: "Workshop Humidity"
      accuracy_decimals: 1
    temperature_offset: 1.5 °C
    update_interval: 5s

Does anyone have an idea what I might be doing wrong?

1 post - 1 participant

Read full topic

MH-Z19C CO2 sensor wrong reading

$
0
0

I have connected up one of the MH-Z19C co2 sensors to an esp8266 nodemcu and I am getting bad data from the co2 sensor. 5000ppm which is the max value it can read. The temp value of the sensor is correct however:

This is the config:

esphome:
  name: living_room
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pw

captive_portal:

# Enable logging
logger:
  hardware_uart: UART1

# Enable Home Assistant API
api:

ota:

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

sensor:
  - platform: mhz19
    co2:
      name: "MH-Z19 CO2 Value"
    temperature:
      name: "MH-Z19 Temperature"
    update_interval: 10s
    automatic_baseline_calibration: true

Can anyone who might have hooked one of these up assist me in setting it up correctly?
The red led light on the sensor itself is flashing on and off (not sure what this means?).
Also, the little white fabric over that light, does it need to be removed? It came with 0 instructions.

9 posts - 2 participants

Read full topic

ESPHome controlled biltong curing chamber?

$
0
0

So I got the crazy idea to let ESPHome controll my curing chamber for biltong and other meats.

biltong_temp_hum
As you can see the temp should be controllable and also the humidity, to lower it I simply use a fan to suck in more of the outside indoor air and to heighten it just shut of the fan.
I guess the simplest method would be to do something like this for the fan?

switch:
  - platform: gpio
    pin: GPIO3
    name: "Curing chamber fan"
    id: chamber_fan_1
sensor:
  - platform: dht
    humidity:
      name: "Curing chamber Humidity"
      on_value_range:
        - above: 80
          then:
            - switch.turn_on: chamber_fan_1
        - below: 60
          then:
            - switch.turn_off: chamber_fan_1

But if we wanted it simple we wouldn’t be here trying to automate everything, right? :smiley:

Would it be possible for example to use the built in PID component but for humidity and a PWM controlled fan?

Oh and as a bonus teaser, I’ve bought a bunch of load cells to get instant readings of the weight loss :crazy_face:

3 posts - 2 participants

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>