Mqtt - help to setup please

I am trying to set up Mqqt integration with Mosquito in Hassio. I really don’t know what to do although I am trying to execute the instructions.

  1. Is the following config ok?
logins: []
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

-----------------------------------------------------

Network
Container	Host	Description
1883/tcp	
disabled
1884/tcp	
disabled
8883/tcp	
disabled
8884/tcp	
disabled

  1. I get the following in the logs which it does not seem right. line 2 WARNING…
[20:06:58] INFO: Setup mosquitto configuration
[20:06:59] WARNING: SSL not enabled - No valid certs found!
[20:06:59] INFO: No local user available
[20:06:59] INFO: Initialize Hass.io Add-on services
[20:06:59] INFO: Initialize Home Assistant discovery
[20:06:59] INFO: Start Mosquitto daemon
1582481219: mosquitto version 1.6.3 starting
1582481219: Config loaded from /etc/mosquitto.conf.
1582481219: Loading plugin: /usr/share/mosquitto/auth-plug.so
1582481219: |-- *** auth-plug: startup
1582481219:  ├── Username/password checking enabled.
1582481219:  ├── TLS-PSK checking enabled.
1582481219:  └── Extended authentication not enabled.
1582481219: Opening ipv4 listen socket on port 1883.
1582481219: Opening ipv6 listen socket on port 1883.
1582481219: Opening websockets listen socket on port 1884.
1582481219: Warning: Mosquitto should not be run as root/administrator

3.in configurator-integration I see the Mosquito Broker integration - when I enter I see

This integration has no devices

I am not sure if until here everything is ok and I don;'t know how to confirm that it is ( I am almost certain that it is not ok).

Can someone help a little please?

It looks ok.
Try publishing/subscribing to all topics - you can do it in HA Developer Tools -> MQTT

thanks.
I don’t know how to do that. What should I enter in the event?

Sorry, it’s MQTT not Event :wink:

ok. I did a test there.
topic= paradoxdCTL/hassio/Arm
Payload (template allowed) = 1 ON
topic to subscribe = #
Message 2 received on paradoxdCTL/hassio/Arm at 8:50 PM: = ON

let me tell you which is my goal.
I need to integrate my alarm with ParadoxRs232toMqtt

I have added to my config.yaml the following as per instuctions of the the above page (wiki)

alarm_control_panel:
 - platform: mqtt
   state_topic: "paradoxdCTL/hassio/Arm"
   command_topic: "paradoxCTL/in"
   payload_disarm: '{"password":"xxxx","Command":"disarm","Subcommand":"0"}'
   payload_arm_night: '{"password":"xxxx","Command":"sleep","Subcommand":"0"}'
   payload_arm_home: '{"password":"xxxx","Command":"stay","Subcommand":"0"}'
   payload_arm_away: '{"password":"xxxx","Command":"arm","Subcommand":"0"}'

HA can see the modes but when I add the card in lovelace I get a status unknown and I can’t alter anything

I am wondering how can I check that I have setup correctly the MQTT first and if it is connected correct to see what else I could do in HA configuration.
Ant ideas how to confirm that MQTT is connected with esp8266?

I think you need to read a little bit about MQTT because some of your questions don’t make sense :\

what is it?

there is no details about your LL config so nobody can help.

post a test message to your state topic and check it’s there by subscribing to it.

Hi.
I did read the link you send me
I did post a test message and it seems that it is working.(see photo)
Now I am having trouble on how to connect my wemo d1 pro with home assistant so as to listen each other. A friend f mine gave it to me (d1) for my paradox alarm. He said I just have to connected it with MQTT.

when I set up the wemo d1 to my network with my phone it gave me a ip address and a port.
don’t I suppose to declare them somewhere in HA?
how HA will communicate with the d1?

Well, that’s why I sent you to MQTT docs.
Everything there works through a broker.
If Wemo wants to pass some information, it posts it to a state MQTT topic (i.e sends it to the broker which will keep it).
If HA wants to know what’s posted to a specific topic, there are special MQTT integrations like MQTT sensor - they subscribe to a given topic and will receive whatever appears there because the broker will send it to every subscriber.

Indirect communication, you see?

So your goal is to configure your Wemo to work with the MQTT broker and then choose and configure an appropriate HA sensor (or whatever else on HA side) to listen to the Wemo’s state topic.

1 Like

I do have to add something like this to my configuration.yaml… right?
I think this is what I am missing?

mqtt:
  broker: 192.168.2.100
  username: mqtt
  password: *****
#  discovery: true
#  discovery_prefix: homeassistant

it depends on what broker you’re using.
If it’s Mosquitto add-on, there’s no need - read this.

Did you point the Wemos D1 to the IP-Adress of your Home Assistant server? Did you configure the username and password on the Wemos D1 to be the same as you configured the MQTT Broker in Home Assistant?

This is the part I am missing. The Wemos D1 was configured from a friend here in Greece but he never asked for these credentials. He is working mainly with openhub.
Here I think that it is clear that these credentials are “blank”

So now I have to 3 questions.
1 Is there a way to modify the wemos d1 with my credentials?
2 Yesterday I tried 2 times to install mqtt integration. The first one I did set username & password, but I didn’t the second time (at least I don’t remember that I did) Is there a way to confirm that I have the right credentials?
3. In the configuration of Mosquitto broker, suggest to delete the port 1883. which I did. Should I enable it?

Disable listening on insecure (1883) ports
Remove the ports from the add-on page network card (set them as blank) to disable them.

Picture2

There has to be a way, I just don’t use a Wemos D1 or similar, so can’t help you here.

You can configure it with or without password. To check if a password is set, try to publish something to a topic from another machine without a password and see if it works.

That depends, at least one of the ports needs to be enabled. If you disable 1883, you also need to change the port in the Wemos D1 settings, otherwise it can’t connect to the broker.

I don’t know how to do that. is there a link you could provide to read? I am totally lost here

On a separate linux machine do the following:

  1. Open a shell
  2. Enter sudo apt-get install mosquitto-clients
  3. Enter mosquitto_pub -m "test message" -t "test_topic"

If you configured a password, this should not work. Otherwise you should see a message “test message” in the topic “test_topic”. Then enter the following to test the password:

mosquitto_pub -t "test" -u "username" -P "password"

I have only windows :frowning:
not my day today (also)

Try the MQTT Explorer

the ip address of home assistant is (in my case) the same as me raspberry. right?

Yes, because from what I read the MQTT broker is installed on the same raspberry as Home Assistant (right?).

right (I guess & hope :))

I new from the begging that this would be one the most difficult tasks and tried to avoid it. The last 2 days
I am trying to read something that’w interrupted from various questions and searches.
mqtt,arduino ide and how to setup it,libraries etc