Tasmota/Sonoff + Automated Discovery in HASS

Hi All,

I wanted to switch my Sonoff Devices over to Tasmota to gain automatic discovery as I want to expand my devices without all the admin of configuring one device at a time.

Here is what i’ve done so far:

  • Flashed Sonoff Switch with the full Tasmota Sonoff firmware, connected to my wifi etc - no issues
  • Discovered the device via TasmotaAdmin (via Home Assistant Add-On), discovered device and can edit it no issues
  • Followed instructions on this page: https://github.com/arendst/Sonoff-Tasmota/wiki/Home-Assistant to configure auto discovery, updated to my MQTT details and then checked it can connect to my MQTT broker
01:48:31 CMD: SetOption19 1
01:48:31 MQT: sonoff/stat/RESULT = {"SetOption19":"ON"}
  • MQTT broker is one via Frenck Add-On (MQTT Server & Web client), it works as I can connect to it and see my Sonoff device connecting in the logs
1562977352: New connection from 192.168.86.182 on port 1883.
1562977352: New client connected from 192.168.86.182 as DVES_F4F8E3 (p2, c1, k10, u'mqtt').
  • Went to check it in “Configuration -> Integrations -> MQTT” as per the GitHub instructions for Auto-Discovery - nothing is displayed.

My Configuration.yaml for MQTT is as follows:

mqtt:
  broker: a0d7b954-mqtt
  username: !secret mqtt_username
  password: !secret mqtt_password
  client_id: home-assistant
  discovery: true

I assumed at this point the device would appear in Home Assistant at this point for configuration via the front-end GUI. But it just says

This integration has no devices.

Would love a hand to get the auto-discovery feature working so I can migrate all my Sonoff Devices across.

Other details:

Problem solved - lots of playing around.

Hi @mitch, I’m wondering if you might remember what made it work. I have the same symptoms you’re describing. see the connections coming in but they don’t show up in integrations -> MQTT broker

I ended up uninstalling all the add-ons then re-adding them with restarts in-between each one. Plus I also reconnected my tasmota flashed devices.

I checked each step worked correctly via NodeRED to check the MQTT calls (I had this installed already so was quickest way to check messages for me)

Something self corrected / I did something wrong during a setup.

Not the most helpful I know but it’s what I did.

1 Like

The autodiscovery prefix is missing here

Whats the point of using integrations if they require restarts and other (guess)work?
I’m asking seriously after lot of problems with shelly mqtt discovery integration. At the end I returned back to using mqtt light/switches/sensors. I admit it requires some restarts but at least it behaves in deterministic way

Hey maxym,

Whilst I agree in a lot of ways it’s annoying an integration is a little trickier to debug than the old school way it’s also more my fault then hass.io.

I, like many of of, have lots of old junk yaml confit code and weird ways of hooking stuff together from 0.50 days of hass when the feature set was a lot more limited.

I’m thinking of resetting fresh to remove all my old yaml code so I get out of these issues in the future as the core has come so far.

I personally prefer the new approach and if I wasn’t so deep in 100’s of devices I’d probably rebuild from scratch.