OK, LONG Hacking Session to get 1-wire Dallas/Maxim temperature sensors working after updates
I just updated HA OS , HA Core and ESPHOME 06/21/24
ESPHome 2024.6.1 HA 2024.6.3
The settings and code for the new version requires several changes to be able to use the Dallas/Maxim temperature sensors (AND the ota syntax is changed too… see below) . The information here:
1-Wire Bus - ESPHome Shows little of the required changes. I will try to update it.
The problems arise especially when using two (or more) ESP32 pins for 1-wire temperature sensors. There is a new syntax for multiple pins. Here’s the original that was working:
esp32:
board: esp32dev
framework:
type: arduino
# -----( IO Devices )---------------------------
dallas:
- pin: GPIO23
id: ONEW_1
- pin: GPIO16
id: ONEW_2
sensor:
- platform: dallas
dallas_id: ONEW_1
address: 0xcf00000065d36e28
name: "Temperature At Panel"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
- platform: dallas
dallas_id: ONEW_2
address: 0x120516a471c3ff28
name: "POOL Heater Output"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
- platform: dallas
dallas_id: ONEW_2
address: 0xd80517a246a3ff28
name: "POOL Temperature"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
HERE is the new working version after 2 hours of guessing:
esp32:
board: esp32dev
framework:
type: arduino
# -----( IO Devices )---------------------------
one_wire: - CHANGES
- platform: gpio - CHANGES
pin: GPIO23
id: ONEW_1
- platform: gpio
pin: GPIO16
id: ONEW_2
sensor:
- platform: dallas_temp - CHANGES
one_wire_id: ONEW_1 - CHANGES (I made this up, but it works…)
address: 0xcf00000065d36e28
name: "Temperature At Panel"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
- platform: dallas_temp - CHANGES
one_wire_id: ONEW_2 - CHANGES
address: 0x120516a471c3ff28
name: "POOL Heater Output"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
- platform: dallas_temp - CHANGES
one_wire_id: ONEW_2 - CHANGES
address: 0xd80517a246a3ff28
name: "POOL Temperature"
unit_of_measurement: "°F"
icon: "mdi:water-percent"
filters:
- lambda: return x * (9.0/5.0) + 32.0; # Convert Celsius to Fahrenheit
AND THEN the OTA changes to this:
# Allow Over-The-Air updates
ota:
password: "xxxxxxxx"
platform: esphome
Can anyone suggest where and how to update the documentation???
THANKS!!!
Regards, Terry King
…In The Woods In Vermont and On The Nile in Egypt
The one who dies with the most Parts LOSES! WHAT DO YOU NEED??