Hi all. I am having trouble configuring my MQTT.
My method to date for adding my sonoff switches was to use the HACS ESP Home add on. It still works but is a bit messy so I thought I’d change to MQTT. I thgink its very close but I cannot see the devices after setting it all up.
My setup is a single RPI3B with a copy of hassio flashed to the card. Its been running for a couple of years and is on the latest versions of hassio and HACS.
I started by removing any reference to MQTT in my configuration.yaml. I removed my MQTT integration. I removed the Mosquito MQTT addon.
I restarted homeassistant.
I added and started the mosquito addon with defaults and re-started home assistant.
I have an administrative user named kens_mqtt_user
I looked in integratioins and found tyhat MQTT had been automatically added and had discovery enabled.
I have a sonoff basic flashed with the latest tasmota via tasmotizer. It has wifi and mqtt configured including kens_mqtt_user as the username.
When I look at the console for my sonoff device I can see that it connected to mqtt
When I look at the mosquito log I can see the device.
1598233953: New connection from 192.168.1.156 on port 1883.
[INFO] found kens_mqtt_user on Home Assistant
1598233955: New client connected from 192.168.1.156 as DVES (p2, c1, k30, u’kens_mqtt_user’)
But in my configuration, I do not see the switch?
How do I make it appear in my home assistant devices?.
btw, I’ve tried lots of combinations of entries in my configuration.yaml from nothing to the current entry:
Thanks, I tried that and it accepted it and displayed the status again.
But nothing in homeassistant.
Am I still supposed to add binary sensor details into my switch.yaml? I thought the auto discovery did that part for me???
I also have TasmoAdmin installed and it sees my sonoff switch OK and allows me to toggle it.
The only part that I’m missing is being able to see it in my Devices. So I cannot add it to the front end.
If I understand correctly the TasmoAdmin will see them because it is using the IP address(s) Just as you would when you login to tasmota on your switch. It is not connecting in that instance via MQTT. So you don’t see any of them under your entities? Also you were sure to set the correct password for your kens_mqtt_user?
Thanks for persevering. Don’t assume that I know what I’m doing, its all very mysterious to me. But yes, I HAVE checked the password.
In home assistant when I look at the MQTT log file, it shows the switch connecting to MQTT.
1598237487: New connection from 192.168.1.111 on port 1883.
1598237487: New client connected from 192.168.1.111 as auto-C0DF1436-44D3-A648-8FE1-B0FE74EAC6DB (p2, c1, k60, u’kens_mqtt_user’).
In the sonoff config, I have set GPIO14 Sensor to be Switch1(9)
The other gpio settings are set to None(0)
In the TasmoAdmin there are lots of config options that I can see but don’t know what they mean. One is SetOption4 - MQTT Response State. It is not set? Should it be?
And I can see in the sonoff config that there is an “Other” settings that includes MQTT.
It has a Device Name and Friendly Name and it has Emulatioin set to “None”
Is that right?
Can you tell me whether or not I should have any binary sensor details in my configuration.yaml?
I DO have that for my sonoff RF-0Bridge that I set up via MQTT a long time back.
I am probably wrong in my assumption that tasmoltizer and tasmoadmin would automatically perform discovery and just add the device to my homeassistant devices.???
My bet is that everyone assumes I know what I’m doing and that I will have done some step or another. What I was really hoping for was a single set of ALL steps to follow to make it work. But I have followed bits from LOTS of different threads a most likely missed one that everyone assumed was too obvious to even mention.
so the login username and password… is that a Home Assistant user/pass?
Also version? Some versions of Tasmota don’t support MQTT discovery.
Tasmoadmin does not use MQTT to access the Sonoff… IP all the way there.