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

Tags: #<Tag:0x00007f3268c48320> #<Tag:0x00007f3268c48208>

then you need cmnd/sonoff for example. You will need to manually change it. (In Tasmota manually change it)

Thanks for your help guys. It’s still not working though. Now the broker is not reporting a connection to the Sonoff IP. I need to just start over again.

image

image

If this is just a simple switch, remove all that shit from config yaml and SetOption19 On… ie USE MQTT discovery.
You might need to remove the MQTT Integration and remove the entry from config and restart and then when it comes back up, add the integration again, check the box for discovery. Then on the Sonoff, SetOption19 On and it should pop right up.

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