Mqtt - help to setup please

It’s actually not that difficult. You made it difficult yourself by using a pre-configured Wemos D1 for which you don’t know how to change the settings :slight_smile:

In the end it’s “just this”:
Setup an MQTT Broker
Tell your devices to publish/subscribe to this broker
Configure Home Assistant to use this broker

you are right, but I would prefer to be plug and play and deal with d1 mini later :slight_smile:

it’s like dealing with a car without a key - “how can I park it here?” :wink:

if the software that flashed on your D1 does support it then yes, otherwise re-flashing only.

1 Like

I am completely stack :frowning:

I downloaded MQTT Explorer and I cannot connect no matter what I tried
I reset the ip address of the module same as my raspberry ( I can see that it is connected to my network)

Do I have to open port 1883 in my router?
Do I have to do any of the following?
For example the customize part?

Access Control Lists (ACLs)
It is possible to restrict access to topics based upon the user logged in to Mosquitto. In this scenario, it is recommended to create individual users for each of your clients and create an appropriate ACL.

See the following links for more information:

Mosquitto topic restrictions
Mosquitto.conf man page
Add the following configuration to enable unrestricted access to all topics.

Enable the customize flag

  customize:
    active: true
    folder: mosquitto
Create /share/mosquitto/acl.conf with the contents:

acl_file /share/mosquitto/accesscontrollist
Create /share/mosquitto/accesscontrollist with the contents:

user [YOUR_MQTT_USER]
topic readwrite #
The /share folder can be accessed via SMB, or on the host filesystem under /usr/share/hassio/share.

no, it’s a port on the machine that runs your MQTT broker.

what does that mean exactly? stick to the facts please.

Just restarted the Mosquitto addon. I tried the credentials and I manage to connect to MQTT Explorer.
I really don’t know how to use it.
How I could confirm that the d1 mini is actually working?

mate, that’s way too lazy. I believe there is plenty of guides around, there is help etc.
do your bit

1 Like

Did you change the configuration of the Wemos D1 to use the IP 192.168.1.8 for the MQTT broker and with the username and password you specified?

MQTT Explorer shows you all the traffic of the MQTT broker where the topics are in tree form. From your screenshot I see, there’s one topic paradoxCTL with a subtopic hassio with a subtopic Arm, the same as you defined in your alarm panel paradoxCTL/hassio/Arm. So your Wemos D1 Mini is not connected to the MQTT Broker. How has this Wemos D1 Mini been setup? Ask your friend how to change the ip, port and username/password on the D1 mini.

Yes, I reconfigure it with the ip 192.168.1.8 and I can see that it is connected to my network.
I did that with my phone. I connected to paradoxCTL network and connected to with my network with mine credentials. Right there I changed the ip also and kept the same port 1883

Regarding the MQTT explorer, I think you are right. If I have understand correct the paradoxCTL should also sent messages (it is connected in the alarm) and I don’t see anything. Is that right?

right now I am thinking to begin the whole procedure from the begging by installing to the D1 the paradox-controller which is based at the same project with some differences. It has some basic installation instauctions which I will try to follow and see what happens.

Again if I understand it correct, I don’t have to enter my network credentials in the d1 installation.
In the description says what I just did

Fire up the Arduino IDE
Load the sketch
Connect your ESP8266 based board to your computer via the USB port
Select the COM port under Tools | Port
Hit the Upload button (second button from the left on the toolbar) and you should see the ESP8266 board LED blink rapidly as the sketch is being uploaded
Once uploaded, the LED will blink
If this is a new board which does not have any Wifi settings configured on yet, use your device like your mobile phone and connect to the Paradox Controller SSID.
Once connected, a browser should appear where you are able to configure initial settings.
Click "Configure WiF"
Enter your Wifi SSID and password
Enter your MQTT broker address and port
Click "Save"
The board will reboot and attempt to connect to your WiFi network and MQTT broker
Once all connects 100%, the LED will blink rapidly a few times.

perhaps the best way to go… but as you said you configured it from your phone, your broker should say something about connection from D1’s address - check the add-on’s logs.

I don’t think that says anything. I don’t know. I am very confused and frustrated right now

[22:59:36] INFO: Setup mosquitto configuration
[22:59:36] WARNING: SSL not enabled - No valid certs found!
[22:59:36] INFO: No local user available
[22:59:37] INFO: Initialize Hass.io Add-on services
[22:59:37] INFO: Initialize Home Assistant discovery
[22:59:37] INFO: Start Mosquitto daemon
1582577977: mosquitto version 1.6.3 starting
1582577977: Config loaded from /etc/mosquitto.conf.
1582577977: Loading plugin: /usr/share/mosquitto/auth-plug.so
1582577977: |-- *** auth-plug: startup
1582577977:  ├── Username/password checking enabled.
1582577977:  ├── TLS-PSK checking enabled.
1582577977:  └── Extended authentication not enabled.
1582577977: Opening ipv4 listen socket on port 1883.
1582577977: Opening ipv6 listen socket on port 1883.
1582577977: Opening websockets listen socket on port 1884.
1582577977: Warning: Mosquitto should not be run as root/administrator.
1582578191: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1582578192: New client connected from 172.30.32.1 as auto-6391C3C7-4xxx-328A-CEEB-F438CF723610 (p2, c1, k60, u'homeassistant').
1582578482: New connection from 192.168.1.3 on port 1883.
[INFO] found MakisMosquito on Home Assistant
1582578484: New client connected from 192.168.1.3 as 0f889fxxxxxxx95c2fe24e5601ffa (p2, c1, k60, u'MakisMosquito').
1582579620: Client 0f889fb75e5d4fc895c2fe24e5601ffa disconnected.
1582579622: New connection from 192.168.1.3 on port 1883.
[INFO] found MakisMosquito on Home Assistant
1582579624: New client connected from 192.168.1.3 as 0f889xxxxxxc895c2fe24e5601ffa (p2, c1, k60, u'MakisMosquito').

I asked if the log shows any connect attempts from your D1’s IP.
I can see nothing.
Have a sleep and start again tomorrow. Just keep in mind nobody will help you if you just say ‘everything is not working’.

You have to enter them somewhere otherwise the D1 can not connect to the MQTT broker.

1 Like

Hi
today was a very busy day so I haven’t got the time to do anything more. However I just found out that I could install a Mqtt client to my phone also. So now I am wondering,
I have the D1 mini connected to my alarm.
I think that the D1 (if it is working ok) is publishing the topics but HA can’t receive them.
Is that assumption right?
If I install in my phone an app like MyMqtt and subscribe to paradoxdCTL/hassio/Arm/# will I be able to see the messages that D1 publish?

No, I don’t think that your D1 is working, otherwise you would see messages published in the MQTT Explorer.

In Home Assistant go to Developer Tools → MQTT and in the listen to events box enter # and press start listening. Then on your phone publish a message to any topic you like and if everything was configured correctly, you should see the message in Home Assistant in the Listen to Events box.

I will be in home in 2 hours and I will test it

One more question because I look for it but I can’t understand.

What it means Setting hassio flag to 1 in define section:

Setting hassio flag to 1 in define section:

Topics enabled:

paradoxdCTL/hassio/ZoneX where x is zone number from 1-32
paradoxdCTL/hassio/ZoneX gives string values ON and OFF
paradoxdCTL/hassio/Arm gives string values:
 disarmed
 armed_home
 armed_away
 triggered

I published a message and Ha received it. That’s good news. Now I have to see what I can do with the d1…

Hi

before a while I managed to connect to my alarm with mqtt! I configured the door sensor and now when I open the door it reports open.
Tomorrow I am planning to add all the available zones.

Right now I have the problem that I can not find out how to configure the alarm status (armed disarmed etc)

I am using this code
in my configuration yaml I have the following

alarm_control_panel:
 - platform: mqtt
   name: paradox_alarm_partition_1
   unique_id: paradox_alarm_partition_1
   state_topic: 'paradox/alarm_status/1'
   command_topic: 'paradox/action/1'
   availability_topic:  'paradox/status'

Can you or someone please give me an example code to understand how I should setup my configuration yaml
At least right now I have problem to understand the concept of topics

do you mean that your code is not working?

how about this?