How to set "setoption19"? -- tasmota devices marked unavailable

Hello,

I have a number of tasmota devices which are discovered by HA, but they are indicated as unavailable.

I read the Forum and it seems one possible solution is to set “setoption19 0” or “setoption19 1” - I really looked around now, I even found some example yaml-code, but whatever I put into my config.yaml throws an error.

Can somebody please give me some guidance where and how in the config or on the HA site I can configure this?

Thanks for your help!

Cheers,
Georg

You need to log into the tasmota device IP address on a web browser, hit the “console” button, then type those commands. There is probably a homeassistant service to set those commands, but easiest to log into the tasmota device directly.

Dear @jaaem - thank you so much, this worked - I had to go to the console of each device, type in “SetOption19 0”, return and then restart the device - afterwards HA had them available again.

I then tested restarting HA (pulling new image) - and HA had all of them “unavailable” again. My question therefore is, whether there is a possiblity from within HA to configure the tasmota devices automatically in a way that they get “SetOption19 0” set and restartet at … “first contact after HA restart”. Again - any help is welcome.

That is strange. That should not happen, once found they should stay found. I have devices I do not use until the holidays and once plugged in, immediately show up after being off for months. Do you have tasmota integration showing? I don’t know if you need to anymore, but I set the mqtt server in each tasmota device to the homeassistant mqtt server. Try that and maybe it will stick. I would try to figure out why not sticking versus making a workaround.

You can make an homeassistant automation to send a command via mqtt (need mqtt setup on each tasmota device), but again you should not need to:

alias: Tasmota SetOption 19 0
description: ""
trigger:
  - platform: time_pattern
    minutes: "5"
condition: []
action:
  - service: mqtt.publish
    data:
      topic: cmnd/tasmota_SERIALNumber1/SetOption19
      payload: "off"
  - service: mqtt.publish
    data:
      topic: cmnd/tasmota_SERIALNumber2/SetOption19
      payload: "off"
mode: single

You can do that, but each HA restart is a write to your device’s flash. And the number of those writes is limited.

Better to ask the status on startup

- id: '1565194745362'
  alias: Status at start HA
  trigger:
  - event: start
    platform: homeassistant
  condition: []
  action:
  - data:
      payload: ''
      topic: cmd/tasmotas/status
    service: mqtt.publish

tasmotas is a default group, no need to do that for each device separate.

Edit: I just read your automation again, even worse, you write every 5 minutes to your device flash !

Yes, pretty bad automation. Just to show it was possible. Your way is much better…