Hi, I’ve finally managed to set up my Wemos D1 Mini Pro with an OLED display. I’ve configured everything, and it’s working as expected, displaying the information I wanted on the OLED screen. I can see RSSI and the IP address on the display.
However, I can’t see these values as entities in Home Assistant. When I open the ESPHome add-on panel, I can see the RSSI value there, but it doesn’t appear as an entity – it just says “entity unavailable.”
I’ve already tried removing the device twice and even deleted the ESPHome integration, but nothing seems to work. I can’t process this further in Home Assistant.
Additionally, I noticed that when adding my ESP device, the integration doesn’t ask me for the API key as shown in the instructions. It just adds the device without prompting for anything.
Does anyone know what might be causing this issue?
esphome:
name: "miernikco2"
friendly_name: "Pomiar CO2 ESP"
esp8266:
board: d1_mini_pro
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "3urC+QEGHm2E3Sj79vngZT7+jpQ0P2bY5kIwrQRRNy8="
ota:
- platform: esphome
password: "469e921300769efa9782801ebe2ffcb7"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Co2-Meter Fallback Hotspot"
password: "Sv6m0IchqQ2w"
font:
- file: "arial.ttf"
id: font10
size: 10
- file: "arial.ttf"
id: font20
size: 20
i2c:
sda: D2
scl: D1
scan: True
frequency: 400khz
sensor:
- platform: homeassistant
name: "Temperatura na zewnątrz"
entity_id: sensor.temperatura_ws
id: temp_sensor
unit_of_measurement: "C"
accuracy_decimals: 1
#on_value:
# then:
# - display.page.show: temperature_page
- platform: wifi_signal
name: "ESPWifi"
update_interval: 1s
id: wifi_signal_sensor
#on_value:
# then:
# - display.page.show: wifi_signal_page # Przełączenie na stronę sygnału Wi-Fi
# Ten sensor będzie trzymał wartość RSSI
text_sensor:
- platform: wifi_info
ip_address:
id: my_ip
name: "ESPIPadres"
display:
- platform: ssd1306_i2c
model: SSD1306_64X48
address: 0x3C
id: my_display
pages:
- id: temperature_page
lambda: |-
char buf[10];
// Sformatowanie temperatury na 1 miejsce po przecinku
sprintf(buf, "%.1f", id(temp_sensor).state);
it.print(0, 0, id(font10), "Temperatura:");
it.print(0, 10, id(font20), buf);
it.print(40, 10, id(font20), "°C");
- id: wifi_signal_page
lambda: |-
// Pobieranie mocy sygnału Wi-Fi (RSSI)
int rssi = id(wifi_signal_sensor).state;
char buf[10];
sprintf(buf, "%d dBm", rssi);
it.print(0, 0, id(font10), "Moc sygnalu Wi-Fi:");
it.print(0, 20, id(font10), buf);
it.print(0, 30, id(font10), id(my_ip).state.c_str());
interval:
- interval: 5s
then:
- display.page.show_next: my_display
- component.update: my_display
#spi:
# clk_pin: D0
# mosi_pin: D1
#display:
# - platform: ssd1306_spi
# model: SH1106_128X64
# cs_pin: D2
# dc_pin: D3
# reset_pin: D4
# lambda: |-
# it.print(0, 0, id(font1), "Hello World!");
captive_portal:
log from ESP:
INFO ESPHome 2024.11.1
INFO Reading configuration /config/esphome/co2-meter.yaml...
INFO Starting log output from 192.168.1.38 using esphome API
INFO Successfully connected to miernikco2 @ 192.168.1.38 in 0.005s
INFO Successful handshake with miernikco2 @ 192.168.1.38 in 2.670s
[11:02:31][I][app:100]: ESPHome version 2024.11.1 compiled on Nov 24 2024, 02:37:50
[11:02:31][C][wifi:600]: WiFi:
[11:02:31][C][wifi:428]: Local MAC: 50:02:91:BA:BC:A5
[11:02:31][C][wifi:433]: SSID: '--------'[redacted]
[11:02:31][C][wifi:436]: IP Address: 192.168.1.38
[11:02:31][C][wifi:439]: BSSID: F4:92:BF:2A-------[redacted]
[11:02:31][C][wifi:441]: Hostname: 'miernikco2'
[11:02:31][C][wifi:443]: Signal strength: -64 dB ▂▄▆█
[11:02:31][C][wifi:447]: Channel: 11
[11:02:31][C][wifi:448]: Subnet: 255.255.255.0
[11:02:31][C][wifi:449]: Gateway: 192.168.1.1
[11:02:31][C][wifi:450]: DNS1: 192.168.1.1
[11:02:31][C][wifi:451]: DNS2: 0.0.0.0
[11:02:31][C][logger:185]: Logger:
[11:02:31][C][logger:186]: Level: DEBUG
[11:02:31][C][logger:188]: Log Baud Rate: 115200
[11:02:31][C][logger:189]: Hardware UART: UART0
[11:02:31][C][i2c.arduino:071]: I2C Bus:
[11:02:31][C][i2c.arduino:072]: SDA Pin: GPIO4
[11:02:31][C][i2c.arduino:073]: SCL Pin: GPIO5
[11:02:31][C][i2c.arduino:074]: Frequency: 400000 Hz
[11:02:31][C][i2c.arduino:086]: Recovery: bus successfully recovered
[11:02:31][I][i2c.arduino:096]: Results from i2c bus scan:
[11:02:31][I][i2c.arduino:102]: Found i2c device at address 0x3C
[11:02:31][C][ssd1306_i2c:023]: I2C SSD1306
[11:02:31][C][ssd1306_i2c:023]: Rotations: 0 °
[11:02:31][C][ssd1306_i2c:023]: Dimensions: 64px x 48px
[11:02:31][C][ssd1306_i2c:024]: Address: 0x3C
[11:02:31][C][ssd1306_i2c:025]: Model: SSD1306 64x48
[11:02:31][C][ssd1306_i2c:027]: External VCC: NO
[11:02:31][C][ssd1306_i2c:028]: Flip X: YES
[11:02:31][C][ssd1306_i2c:029]: Flip Y: YES
[11:02:31][C][ssd1306_i2c:030]: Offset X: 0
[11:02:31][C][ssd1306_i2c:031]: Offset Y: 0
[11:02:31][C][ssd1306_i2c:032]: Inverted Color: NO
[11:02:31][C][ssd1306_i2c:033]: Update Interval: 1.0s
[11:02:31][C][captive_portal:089]: Captive Portal:
[11:02:31][C][mdns:116]: mDNS:
[11:02:31][C][mdns:117]: Hostname: miernikco2
[11:02:31][C][esphome.ota:073]: Over-The-Air updates:
[11:02:31][C][esphome.ota:074]: Address: miernikco2.local:8266
[11:02:31][C][esphome.ota:075]: Version: 2
[11:02:31][C][esphome.ota:078]: Password configured
[11:02:31][C][safe_mode:018]: Safe Mode:
[11:02:31][C][safe_mode:019]: Boot considered successful after 60 seconds
[11:02:31][C][safe_mode:021]: Invoke after 10 boot attempts
[11:02:31][C][safe_mode:022]: Remain in safe mode for 300 seconds
[11:02:31][C][api:140]: API Server:
[11:02:31][C][api:141]: Address: miernikco2.local:6053
[11:02:31][C][api:143]: Using noise encryption: YES
[11:02:31][C][wifi_signal.sensor:010]: WiFi Signal 'ESPWifi'
[11:02:31][C][wifi_signal.sensor:010]: Device Class: 'signal_strength'
[11:02:31][C][wifi_signal.sensor:010]: State Class: 'measurement'
[11:02:31][C][wifi_signal.sensor:010]: Unit of Measurement: 'dBm'
[11:02:31][C][wifi_signal.sensor:010]: Accuracy Decimals: 0
[11:02:31][C][wifi_info:010]: WifiInfo IPAddress 'ESPIPadres'
[11:02:31][C][homeassistant.sensor:030]: Homeassistant Sensor 'Temperatura na zewnątrz'
[11:02:31][C][homeassistant.sensor:030]: State Class: ''
[11:02:31][C][homeassistant.sensor:030]: Unit of Measurement: 'C'
[11:02:31][C][homeassistant.sensor:030]: Accuracy Decimals: 1
[11:02:31][C][homeassistant.sensor:031]: Entity ID: 'sensor.temperatura_ws'
[11:02:31][D][sensor:093]: 'ESPWifi': Sending state -67.00000 dBm with 0 decimals of accuracy
[11:02:32][D][sensor:093]: 'ESPWifi': Sending state -70.00000 dBm with 0 decimals of accuracy
[11:02:33][D][sensor:093]: 'ESPWifi': Sending state -69.00000 dBm with 0 decimals of accuracy
[11:02:34][D][sensor:093]: 'ESPWifi': Sending state -67.00000 dBm with 0 decimals of accuracy
[11:02:35][D][sensor:093]: 'ESPWifi': Sending state -69.00000 dBm with 0 decimals of accuracy
[11:02:36][D][sensor:093]: 'ESPWifi': Sending state -69.00000 dBm with 0 decimals of accuracy
[11:02:37][D][sensor:093]: 'ESPWifi': Sending state -68.00000 dBm with 0 decimals of accuracy
[11:02:38][D][sensor:093]: 'ESPWifi': Sending state -66.00000 dBm with 0 decimals of accuracy
[11:02:39][D][sensor:093]: 'ESPWifi': Sending state -67.00000 dBm with 0 decimals of accuracy
[11:02:40][D][sensor:093]: 'ESPWifi': Sending state -67.00000 dBm with 0 decimals of accuracy
[11:02:41][D][sensor:093]: 'ESPWifi': Sending state -66.00000 dBm with 0 decimals of accuracy