Heads up for Esphome 2024.6

What do I change this to?

ota:
  safe_mode: true
  password: !secret ota_password
  on_begin:
    then:
      - logger.log: "OTA start"
  on_progress:
    then:
      - logger.log:
          format: "OTA progress %0.1f%%"
          args: ["x"]
  on_end:
    then:
      - logger.log: "OTA end"
  on_error:
    then:
      - logger.log:
          format: "OTA update error %d"
          args: ["x"]

If I add “platform” in any position or format I get this at the top of the editor in Home Assistant, e.g.:

ota:
  platform: esphome
    safe_mode: true
  password: !secret ota_password
  on_begin:

Edit: Deleted to avoid confusion. See below for correct config: Heads up for Esphome 2024.6 - #13 by Troon

Edit: Deleted to avoid confusion. See below for correct config: Heads up for Esphome 2024.6 - #13 by Troon

How is update_interval:30 used now with 1-wire?

safe_mode is its own component (ref):

ota:
  - platform: esphome
    password: !secret ota_password

safe_mode: 

dallas becomes one_wire like this (ref):

one_wire:
  - platform: gpio
    pin: D7

and the sensors change to dallas_temp (ref) (for temperature sensors like DS18B20) including the update_interval here rather than under one_wire:

sensor:
  - platform: dallas_temp
    update_interval: 30s
    address: ...
1 Like

Ah, so that is required in addition to this?

https://esphome.io/components/ota

Screenshot 2024-06-20 at 19-47-16 ESPHome OTA Updates — ESPHome

EDIT: that document is out of date. Do not use it.

What’s with dallas old option “index” ? It’s unknown feature now…?
i’ve had setup below, since i have three dallas sensors, but each on it’s own gpio, so i don’t use dallas addresses.

Also: has “update_interval” moved from “dallas” config to “platform: dallas_temp” ?

  - platform: dallas
    index: 0
    name: "Temperatura sanitarne vode"
    dallas_id : dallas_hub_1
    accuracy_decimals: 0
    filters:
      - offset: 1.0

Ahh… wondering what the problem with my update was. Thanks for the post.

Yes. Just changed all of mine:

sensor:
  - platform: dallas_temp
    address: 0x1a3c01e07605b228
    name: "Tank Temperature"
    update_interval: 3s
    filters:
      - sliding_window_moving_average:
          window_size: 10
          send_every: 10
          send_first_at: 1

  - platform: dallas_temp
    address:  0x58000000167d7228
    name: "HP Inlet Temperature"
    update_interval: 3s
    filters:
      - sliding_window_moving_average:
          window_size: 10
          send_every: 10
          send_first_at: 1
2 Likes

No, that doc is out of date.

1 Like

Hm… when entering exactly above lines then line “safe_mode: true” is underlined with red, error is that safe mode has moved from ota to it’s own component…

Yes the docs are incorrect and need updating. See the post directly above yours by Troon.

Yes, i see, thanks. I guess i was writing at the same time with Troon, so i didn’t see his post. entering “safe_mode:” directly (without indent) has no errors.

However… is now necessary to enter this line or is safe mode enabled by default when nothing is stated (like it used to be)? I neved wrote this line in my yaml’s, but all are safe mode enabled…

I’ve created a pull request to fix the docs. Update ota.rst by tomlut · Pull Request #3973 · esphome/esphome-docs · GitHub

3 Likes

Looks like it has been removed.

Now for your set up you have to create three 1wire bus components with ids that you would reference in the dallas_temp platform.

one_wire:
  - platform: gpio
    pin: GPIOXX
    id: bus1
  - platform: gpio
    pin: GPIOYY
    id: bus2
  - platform: gpio
    pin: GPIOZZ
    id: bus3

sensor:
  - platform: dallas_temp
    one_wire_id: bus1
    name: "Temperatura sanitarne vode"
    update_interval: 60s
    accuracy_decimals: 0
    filters:
      - offset: 1.0
2 Likes

Yes, i did that, compiled and all is ok.
Now it’s just if i dare to send this bin to my esp and risk all 3 dalass sensors failing… :thinking:
I actually forgot why “index” was there for… but if i recall correcly (it’s been a while…) that sensors didn’t work without it…

It used to say this:

Screenshot 2024-06-20 at 20-19-06 Dallas Temperature Sensor — ESPHome

2 Likes

Aha, so old way it seems that it was required if used without address. Now it seems that it’s done automatically, since manual says for address “Required if there is more than one device on the bus.”

I know, it’s better to use addresses, but i’ve had my share of bad luck with dallas sensors back then when working with Atmel AVR’s, when i’ve had 10 of them on the same bus. Which worked great … until… one of them died and consequently all results went to 85 degrees. WHICH one of 10 was P.I.T.A. to find, since all were soldered, isolated with heat-shrinking tube with thermal paste inside… it was like i was doing whole 10-sensor thing all over again, only worse… from there on, i rather put each one on its own pin, if only possible (and within reasonable limits).

I guess i’ll test it in the evening, when i’ll have some time to repair if it dies…

EDIT: i was watching 2024.6 livestream: they say that safe mode is enabled by default, so no action or entry is needed UNLESS you tinker with default settings (which are: enabled and entering safe mode after boot 10 attempts).

FYI…

Just updating my esp_home devices and noticed that I don’t have an ota: section for my M5Stack configuration.

Can’t quite recall why its different now but the update seems to be installing without having updated the configuration.