I (newby) have an RPI5 running HAOS 2024.8.0. One D1mini ESP-12S with a CJMCU-9808 temp sensor just (less than 24 hours ago) threw the subject error message. The device is on my Wi-Fi and shows temps being recorded in the device log, but the dashboard shows the temperature reading as unavailable. I never had an encryption key on this device. I have deleted the device and re-adopted it. Also, I have reinstalled it. I prefer to resolve this without adding the encryption key as I don’t want to get into another level of password/keyword management if possible.
Supplemental Info:
Since my initial post, I deleted the device I added it using the local USB method. When I check the yaml, there was a set of new passwords and keys added to the yaml. I then when back to the device in HA to configure it and the UI would not accept the encryption key that I found in the device’s revised yaml. It sounded like HA was pointing to the old yaml and didn’t think there was a key. Note I used the same device name. Posted below is a portion of the revised yaml.
2nd Supplemental Info
I have since learned that I do not have to reinstall the device locally (a pain) but rather I just add a couple of lines to the API: section of the yamel and then reinstall OTA and then reconfigure the device using the new encryption key. Added lines are as follows:
api:
encryption:
key: "kJNrzVLTn9tXlO45RbwtCP2gAKRstlcqHB4WFYeCVo4="
FULL YAML
substitutions:
name: d1mini04
friendly_name: D1mini04
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
# Set up a wifi access point
ap: {}
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp8266.yaml@main
import_full_config: true
# To have a "next url" for improv serial
web_server:
i2c:
sda: GPIO4
scl: GPIO5
scan: true
id: bus_a
sensor:
- platform: mcp9808
name: "Living Room Temperature"
update_interval: 60s
Part of Revised yaml
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "kJNrzVLTn9tXlO45RbwtCP2gAKRstlcqHB4WFYeCVo4="
ota:
- platform: esphome
password: "dc7d47f57fa9a79550b1485ca40a2c18"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "D1Mini04 Fallback Hotspot"
password: "S0hbWGl3EncQ"
captive_portal:
LATEST LOG
INFO ESPHome 2024.7.3
INFO Reading configuration /config/esphome/d1mini04.yaml...
INFO Starting log output from 192.168.0.61 using esphome API
INFO Successfully connected to d1mini04 @ 192.168.0.61 in 0.003s
INFO Successful handshake with d1mini04 @ 192.168.0.61 in 0.020s
[07:41:40][I][app:100]: ESPHome version 2024.7.3 compiled on Aug 11 2024, 07:35:56
[07:41:40][I][app:102]: Project esphome.web version dev
[07:41:40][C][wifi:599]: WiFi:
[07:41:40][C][wifi:427]: Local MAC: 84:F3:EB:23:B2:E5
[07:41:40][C][wifi:432]: SSID: 'XXX-XXX-XXX']redacted]
[07:41:40][C][wifi:435]: IP Address: 192.168.0.61
[07:41:40][C][wifi:438]: BSSID: XX:XX:XX:XX:XX:XX[redacted]
[07:41:40][C][wifi:440]: Hostname: 'd1mini04'
[07:41:40][C][wifi:442]: Signal strength: -66 dB ▂▄▆█
[07:41:40][C][wifi:446]: Channel: 11
[07:41:40][C][wifi:447]: Subnet: 255.255.255.0
[07:41:40][C][wifi:448]: Gateway: 192.168.0.1
[07:41:40][C][wifi:449]: DNS1: 192.168.0.1
[07:41:40][C][wifi:450]: DNS2: 0.0.0.0
[07:41:40][C][logger:185]: Logger:
[07:41:40][C][logger:186]: Level: DEBUG
[07:41:40][C][logger:188]: Log Baud Rate: 115200
[07:41:40][C][logger:189]: Hardware UART: UART0
[07:41:40][C][i2c.arduino:071]: I2C Bus:
[07:41:40][C][i2c.arduino:072]: SDA Pin: GPIO4
[07:41:40][C][i2c.arduino:073]: SCL Pin: GPIO5
[07:41:40][C][i2c.arduino:074]: Frequency: 50000 Hz
[07:41:40][C][i2c.arduino:086]: Recovery: bus successfully recovered
[07:41:40][I][i2c.arduino:096]: Results from i2c bus scan:
[07:41:40][I][i2c.arduino:102]: Found i2c device at address 0x18
[07:41:40][C][mcp9808:037]: Living Room Temperature:
[07:41:40][C][mcp9808:038]: Address: 0x18
[07:41:40][C][mcp9808:042]: Update Interval: 60.0s
[07:41:40][C][mcp9808:043]: Temperature 'Living Room Temperature'
[07:41:40][C][mcp9808:043]: Device Class: 'temperature'
[07:41:40][C][mcp9808:043]: State Class: 'measurement'
[07:41:40][C][mcp9808:043]: Unit of Measurement: '°C'
[07:41:40][C][mcp9808:043]: Accuracy Decimals: 1
[07:41:40][C][captive_portal:088]: Captive Portal:
[07:41:40][C][web_server:173]: Web Server:
[07:41:40][C][web_server:174]: Address: d1mini04.local:80
[07:41:40][C][mdns:116]: mDNS:
[07:41:40][C][mdns:117]: Hostname: d1mini04
[07:41:40][C][esphome.ota:073]: Over-The-Air updates:
[07:41:40][C][esphome.ota:074]: Address: d1mini04.local:8266
[07:41:40][C][esphome.ota:075]: Version: 2
[07:41:40][C][safe_mode:018]: Safe Mode:
[07:41:40][C][safe_mode:019]: Boot considered successful after 60 seconds
[07:41:40][C][safe_mode:021]: Invoke after 10 boot attempts
[07:41:40][C][safe_mode:022]: Remain in safe mode for 300 seconds
[07:41:40][C][api:139]: API Server:
[07:41:40][C][api:140]: Address: d1mini04.local:6053
[07:41:40][C][api:144]: Using noise encryption: NO
[07:41:40][C][improv_serial:032]: Improv Serial:
[07:42:11][D][mcp9808:074]: Living Room Temperature: Got temperature=23.8750°C
[07:42:11][D][sensor:093]: 'Living Room Temperature': Sending state 23.87500 °C with 1 decimals of accuracy
[07:43:11][D][mcp9808:074]: Living Room Temperature: Got temperature=23.8750°C
[07:43:11][D][sensor:093]: 'Living Room Temperature': Sending state 23.87500 °C with 1 decimals of accuracy