Mqtt "this integration has no devices" with tasmota connected to add-on broker

Doesn’t work. Read my earlier posts. There is no sonoff device. I’m trying it again just to be sure.

  • Sonoff is connect to the Broker.
  • MQTT Integration is discoverd.
  • Enable Discovery is selected.
  • setoption19 on. sonoff/stat/RESULT = {“SetOption19”:“ON”}
  • ???
    image

Can you show what is displaying in MQTT Explorer please? Turn it on in the Tasmota console and off… just want to see messages going to the broker.

Something is wrong with the add-on broker. It is not doing its job, I think. When I call service mqtt.publish with this data:

{
   "topic":"home-assistant/switch/1/on",
   "payload":"Switch is ON"
}

There is nothing in the broker log, nothing on MQTT Explorer, nothing on the sonoff console.

We were on the same line of thought. There is nothing in any log when I toggle the tasmota.

ok 192.168.1.6 is the IP address of the broker? And you have a Mosquitto user defined as a Home Assistant user? (and password)?
When you don’t define a user/password in the broker it uses a home assistant user to authenticate. That needs to be configured in Tasmota as well.
The accesscontrollist should also have this user. I did find I also had to add homeassistant as a user as well.
Also, what makes you think that servce mqtt.publish will do anything at all??? I asked you to do it in the Tasmota Console for a reason - to see if the sonoff is connecting to the broker.

  1. Yes
  2. I have mosquito user with password as a home assistant user. (I know I spelled it wrong, sorry).
  3. I think I am not defining a home assistant user/password in the broker, because the Logins: [] brackets are empty. Is that what needs done? I’ve tried it both with “mosquito” and without.
  4. You are saying Tasmota also needs no user and password? I have it configured to the mosquito user.
  5. Access control does have mosquito user. I have now added homeassistant and restarted the broker.
  6. I was following the MQTT Testing page that I linked.

In the Broker, have it like this:

{
  "logins": [],
  "anonymous": false,
  "customize": {
    "active": true,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "quiet_logs": true
}

That is the default. no user defined but active set to true. The Broker will then use a Home Assistant user to authenticate.
In my Tasmota it looks like this:


My broker is the same as my home assistance instance on 10.90.11.100 and mqttuser is defined as a user in Home Assistant with a username and password.

My accesscontrollist looks like this:

user mqttuser
topic readwrite #
user homeassistant
topic readwrite #

acl.conf

acl_file /share/mosquitto/accesscontrollist

If you change any of this, restart the Broker.

Then Toggle the switch here:
image

In MQTT Explorer:
image
and then when I toggle:
image

That will prove it’s being seen by the Broker.

The only thing suspicious in my settings are the accesscontrollist. I have it like this:

user mosquito
user homeassistant
topic readwrite #

Now I rebooted Hass.io so it will be down for an hour. I’ll change the file in the morning.

The next thing I’m going to try is the largest hammer I can afford after I buy HomeSeer. I will never look back at the shattered parts of HomeAssistant.

Down for an hour?? Well that accesscontrollist won’t work I don’t think. If you edit that file you just need to restart the broker.

That was it! It works. Thanks for everyones help.

David, please if you can: you need to edit the mosquitto setup page because it is not correct. There are many things out of sequence for this process that is very delicate. The ACL is wrong.

1 Like

The first thing I asked you was if you had set up an ACL and pointed to the docs, and you said ‘yes’ :roll_eyes:

There’s a link on the top right of every HA document page to submit improvements and corrections.

Thanks for nothing Tom! As I said to you already, I did set up ACL exactly as indicated in the document you linked, and the document is wrong. Do you understand that yet? You must because you’re asking me to submit improvements to that very document.

If you’re just responding to make yourself feel better for not helping then stop wasting my time and your own.

Apologies if I offended you.

As I said there are links at the top of every document that enable you to submit edits for consideration. Even if the document only requires updating for clarity you may submit a pull request.

This is an open source project and keeping the documents up to date in particular are an easy way to get involved.

The link has moved slightly to the left but these instructions remain valid:

Glad we got there in the end…

Hi all, i having the same problem but failed to resolve it. Should i continues this post or create new one ?

  1. Using Hassio on Pi
  2. Install MQTT from Hassio Add On
  3. Perform Configuration > Integration > MQTT with Discovery.
  4. My newly flash tuya smart plug with power monitor with tasmota able to connect MQTT and i saw feedback on MQTT explorer to confirm tasmato is communicate with MQTT.
  5. Can’t see my plug show on HA UI. Inside Configuration > Integration > MQTT show “this intergration has no devices”
  6. No additional code in configuration.yaml. As i suppose if you use above method HA should be able to detect and auto add the device right? Or if is working, i should be able to add the device from Configuration > Integration > MQTT (saw few youtube it work easily) but mine :cold_sweat:

spent almost 24 hours on this keep find read/watch forum & youtube but still can’t fix the problem. Anyone can help ? thanks

MQTT CONFIG
{
“logins”: [],
“anonymous”: false,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

DATA SHOW IN MQTT EXPLORER
image

Million Thanks

1 Like

Problem resolved ! thanks @DavidFW1960 for the help. Turn out is due to the Tuya-Convert firmware does not suppose auto discover. So have to manually update the firmware to sonoff.bin after complete tuya convert.

2 Likes

Did all what Merlin indicated and still couldn’t get this after beating my head against a wall for a week. d3vilsim post was the final fix for me, I was running sonoff basic and needed to update to sonoff.bin. Didn’t realize this as everything else seemed to work, it ‘accepted’ the setoption19, etc. finally my switches show up, all via discovery. thanks.

1 Like

I am having a similar issue to d3vilsim where I’m unable to get my device flashed with Tasmota to show up in HA despite it connecting to MQTT broker.

  1. Using Home Assistant full supervised Operating System
  2. Mosquitto broker from Home Assistant add-on installed
  3. Mosquitto integration configured to use auto discovery
  4. Newly flashed Tuya smart plug with Tasmota. Able to connect to MQTT broker with confirmed feedback using MQTT explorer. SetOption19 = 1
  5. Plug does not show on HA UI.
  6. No additional code in configuration yaml, everything left as default.

MQTT CONFIG:

logins: []
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Can anyone help?

Did you flash the FULL Tasmota after the updrade? The tasmota-lite.bin Tuya uses is not compatible with discovery. You must load firmware that allows discovery so just flast tasmota.bin and it will work.

I did not flash the full Tasmota firmware after using Tuya-Convert and that was the issue. Now I have flashed the full firmware it is working as expected. I should of read the Tuya-Convert documentation again. Thanks for your help.