Mqtt questions (again) and a couple of general questions

Ok so it literally seems I take one step forward, and two back. I’ve had my first set up working, but after doing wrong setup on config.yaml it won’t boot back up. Anyhow I will read up again on how to properly rescue my setup via ssh and samba, instead of starting all over from scratch like I have been doing.

I can’t forward ports since I seem to be behind a double NAT. If I want to access my setup from outside my best bet will probably be to pay for the HA cloud monthly service. For the near future I don’t plan to access it from the outside so I didn’t set up lets encrypt and duckdns this time around. (At one point I had it as https:// but to get into it I would get a “site not secure” page first where I had to click to acknowledge it was not a “secure” connection)

So on my fresh install of hassio I added configurator, mosquito mqtt and samba.

this is on my config.yaml file

mqtt:
  broker: 10.0.0.227
  username: mqttuser
  password: mqttUserPW
  
switch:
  platform: mqtt
  name: “Luz Cuarto Vale”
  command_topic: “cmnd/CuartoVale/power”
  state_topic: “stat/CuartoVale/POWER”
  qos: 1
  payload_on: “ON”
  payload_off: “OFF”
  retain: true

Then on the mosquito configuration I have

    {
  "logins": [
    {
      "username": "mqttuser",
      "password": "mqttUserPW"
    }
  ],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

on the tasmota switch, I did verify the CuartoVale topic on the mqtt setup. I am pretty sure it is connecting because the led’s stop blinking. I also selected the option to emulate wemo belkin.

My home assistant does recognize it as a belkin switch and works as expected, it also lists out the “Luz Cuarto Vale” on overview/states page but when I try to toggle the switch it doesn’t work.

What am I missing? Switches are connecting to the mqtt server, so it doesn’t seem to be a username/password problem. The info on the yaml file seems to be formatted correctly so not sure what else to look at other than restarting from scratch again.

the first thing you are missing is properly formatting your code in your posts. :wink:

Ok i fixed it for the most part :blush: (the formatting)

check your quotation marks ("). They look like they are the “curly” ones instead of the plain standard text ones like all of the ones in this sentence are.

try this for the switch:

switch:
  platform: mqtt
  name: 'Luz Cuarto Vale'
  command_topic: 'cmnd/CuartoVale/power'
  state_topic: 'stat/CuartoVale/POWER'
  qos: 1
  payload_on: 'ON'
  payload_off: 'OFF'
  retain: true

What switch is it?

thank you so much for all the input. Maybe it was the curly things as you had mentioned. On my other post I got some instructions on how to set up mosquito mqtt via the integration, and also how to turn on my tastmotos auto discovery mode as well. I got an mqtt switch working again!