Tasmota is connected (as the snippet indicates)
- what .bin did you flash ? Not all versions of Tasmota support auto-discovery
- did you enter the command
setoption19 1
in the tasmota console ?
Tasmota is connected (as the snippet indicates)
setoption19 1
in the tasmota console ?looks good
can show us you
switch config
should look some like this
- platform: mqtt
name: "SpareRoom"
state_topic: "stat/SW_LRoom/POWER"
command_topic: "cmnd/SW_LRoom/POWER"
availability_topic: "tele/SW_LRoom/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
snap @francisp about the setoption19 1
I used Tuya-Convert, so I started with the .bin that was included in that. I believe it was tasmota.bin v8.1.x. I tried setoption19 1 with that .bin and didn’t see the entities in Home Assistant, so I upgraded to the latest release, v8.3.1, and tried setoption19 again, but still no auto-discovery.
- platform: mqtt
name: "LivingRoomSwitch1"
state_topic: "stat/SW_LRoom/POWER1"
command_topic: "cmnd/SW_LRoom/POWER1"
availability_topic: "tele/SW_LRoom/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
This is what my config looked like when I was testing the manual config option. This method created the entity, but it appeared as unavailable.
Ok, go to developer tools -> mqtt
First under ‘Topic to subscribe to’, enter # , and click start listening.
Then, under ‘Publish a packet’, enter test, next to payload ‘on’, and click publish
What do you see now under start listening ?
1590616591: New connection from 172.30.32.1 on port 1883.
[WARN] Not found homeassistant on local database
1590616592: Socket error on client <unknown>, disconnecting.
1590616712: New connection from 172.30.32.1 on port 1883.
1590616712: Socket error on client <unknown>, disconnecting.
1590616832: New connection from 172.30.32.1 on port 1883.
1590616832: Socket error on client <unknown>, disconnecting.
I appreciate the help with debugging.
Yes, you should have seen the message appearing as soon as you hit ‘publish’. So HA is not listening to your broker.
Besides the add-on (you posted the config in the first post), how did you configure the broker in HA ? Through the integration or manually in configuration.yaml ?
Looks like there is no valid homeassistant system user.
[WARN] Not found homeassistant on local database
1590546993: Socket error on client <unknown>, disconnecting.
I just used the UI integration to configure and enable auto-discovery. I think you’re right about HA not listening to the broker, but I’m not sure how that could have happened.
Weird. Maybe that is the problem. Do you see a homeassistant user when you go to Configuration -> Users?
Yes I do.
There’s a specific instruction not to use homeassisstant as the mqtt user. So it must be used for something. What?
Hmm. Sounds like @francisp does not have a homeassistant user and doesn’t have problems, but @tom_l does. I’m really not sure what else to do to try and fix the problem. Any ideas?
same problem here. any solution?
same problem too… Im using a raspberry pi 4 8gb… so the system is 64bits, is there any issues about it?
change “anonymous: true” in mosquito config file
anonymous: true
worked for me but…
I found out from here: https://youtu.be/1uxRvbbd0fc?t=497 that the MQTT integration automatically sets the username to homeassistant
.
I’m assuming the user used to exist before the internal MQTT broker was removed?. Anyway, hitting “Reconfigure” on the MQTT integration, and using a specifically created new user (and its password) works with no problems and means anonymous can be set to false once again.
anonymous: true did not work for me, having the same problem as OP