MQTT Discovery

Yes they were the same username/password. Apparently SmartThings MQTT devices are not discover-able.
As far as username/password in Mosquito MQTT, it was only used for others “Smarthings & Home Assistant” to securely connect to it "Mosquito"correct?

Home Assistant Config needed the username/password to connect to the Mosquito and
SmartThings MQTT Bridge needed it to also connect to Mosquito.

Not sure how they would have conflicted.

Well if you had it in the options for the MQTT addon and it is the same as a HA user then you have the same user as a local user and HA user so I was thinking that may be a conflict and might explain why removing the local user made it start working.

It still did not work, until I added all my sensors back into binary_sensor.yaml

Looking at the sonoff Pow2 console output with option19 set on, HA should pick up the switch:

15:22:52 MQT: homeassistant/switch/sonoff_lounge_dehumidifier_1/config = {"name":"Lounge Dehumidifier","command_topic":"cmnd/sonoff_lounge_dehumidifier/POWER","state_topic":"stat/sonoff_lounge_dehumidifier/RESULT","value_template":"{{value_json.POWER}}","payload_off":"OFF","payload_on":"ON","availability_topic":"tele/sonoff_lounge_dehumidifier/LWT","payload_available":"Online","payload_not_available":"Offline"} (retained)

However there are no definitions for the energy monitoring capabilities. So I would have to configure the sensors manually anyway. I might just leave this off for now.

Tried Tasmota 6.3 in one of my basics again with OTA update. It stopped responding to wifi. Had to pull it out of the wall and reflash via USB. Went back to 6.2.1 to be safe. I then changed the wifi hostname of this device via the web interface and it stopped connecting to wifi again. Arrgh!. Fortunately after a power cycle and it came back. Tasmota 6 seems a bit buggy to me. Might go back to v5.

That’s bizarre. I have used every version since 5.12 and never had a problem. Even the reported ‘buggy’ ones always worked for me.

Hi Dave
I am about to do what you did adding MQTT Discovery ,what advice can you give me. I see you said your device names changed which would cause problems all over the place.
Should I leave my devices as is and just worry about the new ones that I add ?

Thanks

I’d update and go for consistency going forward. Otherwise you will eventually wish you did.

@dmoses1969
I don’t know if you still need a way to discover SmartThings devices in MQTT, but I’ll post for others benefit…
SmartThings MQTT Bridge does not have discovery, but you can publish a message similar to below on a MQTT client program like MQTTfx in order to discover your devices with MQTT…

Publish to TOPIC…

homeassistant/light/lx_01/config

with PAYLOAD…

{
"~":"smartthings/lx.MCDesk",
"name":"lx_MCDesk",
"stat_t":"~/switch/state",
"cmd_t":"~/switch/cmd",
"on_cmd_type":"first",
"opt":false,
"pl_off":"off",
"pl_on":"on",
"uniq_id":"mcdesk_light",
"dev":{"ids":["LX01"]},
"bri_cmd_t":"~/level/cmd",
"bri_scl":100,
"bri_stat_t": "~/level/state",
"qos":0,
"ret":true
}

with…
QOS = 0
and
RETAIN = true
The above is just an example of how to discover a light that has dimming capabilities. Change the TOPIC and PAYLOAD around to suit your needs.

Use this page to help with setup…
MQTT Discovery

2 Likes