Mqtt - help to setup please

The above code is not working for me-probably I am doing something wrong ( I tried with one qoute ’ + ")
I got status unknown. The entrance door (binary sensor example is working)

I can understand the concept of topics in theory now but I can’t implement it in the configuration thus I would like to see an example

I have read this also but I can not implement it

first you need to make sure your hardware alarm is publishing its state to MQTT topic - have you done that?

when I enter # I get only the zones. could that be the problem? if yes do you have a clue why it doesn’t?

where do you enter #? - do you mean listen to all topics?
if yes, you should see something in there when you arm/disarm your alarm - post it here.

yse listen to all topics. I just turn the alarm to sleep mode and got the following

Message 54 received on paradox/alarm_status/1 at 1:31 AM:
armed_away

I checked the status of alarm in fronted. It did changed… I disarm it and it is working

Super happy! I have to see why it says unknown in the begging. I think it should say unarmed
Probably due to this, but I don’t get it right now (retain flag)

The mqtt alarm panel platform enables the possibility to control MQTT capable alarm panels. The Alarm icon will change state after receiving a new state from state_topic. If these messages are published with RETAIN flag, the MQTT alarm panel will receive an instant state update after subscription and will start with the correct state. Otherwise, the initial state will be unknown.

it means your state topic is paradox/alarm_status/1 and payload is arm_away
does it make things better?
try to declare payload_arm_away: armed_away
and try to comment unique_id and availability_topic for now

I will try them first thing in the morning. Hope you are around
Thanks

Hi
there is a problem with the original setup of the alarm. Some zones that are actually open, they are displaying as open in the keyboard but a few seconds later are reported as closed. I am expecting the technician to check them. (I hope that he can come after a few days). We installed the alarm yesterday
Meanwhile in order to debug I disconnected the esp8266 from serial and power.
Can you explain me why HA is still can receive data from the alarm? Please see the logs even if it is disconnected? It says that it is offline. I thought that since I disconnected it it won’t receive any messages.

Listen to a topic
 
Listening to
#
 
Message 15 received on paradox/alarm_status/2 at 12:06 PM:
disarmed
QoS: 0 - Retain: true
Message 14 received on paradox/alarm_status/1 at 12:06 PM:
stopped
QoS: 0 - Retain: true
Message 13 received on paradox/event/trigger_zone at 12:06 PM:
0
QoS: 0 - Retain: true
Message 12 received on paradox/event/zone/8 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 11 received on paradox/event/zone/13 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 10 received on paradox/event/zone/11 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 9 received on paradox/event/zone/10 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 8 received on paradox/event/zone/6 at 12:06 PM:
1
QoS: 0 - Retain: true
Message 7 received on paradox/event/zone/2 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 6 received on paradox/event/zone/7 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 5 received on paradox/event/zone/5 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 4 received on paradox/event/zone/1 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 3 received on paradox/event/zone/9 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 2 received on paradox/event/zone/3 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 1 received on paradox/event/zone/4 at 12:06 PM:
0
QoS: 0 - Retain: true
Message 0 received on paradox/status at 12:06 PM:
offline

This should be a clue :

Your broker keeps these messages if you set the retain flag.

thanks, I will check it asap.

I deleted the line retain:true. I restarted HA but still can read the status etc.
Is there any chance the MQTT to cause trouble in the readings of the alarm in the keyboard?
Do you or anyone else knows?

Listen to a topic
 
Listening to
#
 
Message 15 received on paradox/alarm_status/2 at 1:03 PM:
disarmed
QoS: 0 - Retain: true
Message 14 received on paradox/alarm_status/1 at 1:03 PM:
stopped
QoS: 0 - Retain: true
Message 13 received on paradox/event/trigger_zone at 1:03 PM:
0
QoS: 0 - Retain: true
Message 12 received on paradox/event/zone/8 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 11 received on paradox/event/zone/13 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 10 received on paradox/event/zone/11 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 9 received on paradox/event/zone/10 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 8 received on paradox/event/zone/6 at 1:03 PM:
1
QoS: 0 - Retain: true
Message 7 received on paradox/event/zone/2 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 6 received on paradox/event/zone/7 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 5 received on paradox/event/zone/5 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 4 received on paradox/event/zone/1 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 3 received on paradox/event/zone/9 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 2 received on paradox/event/zone/3 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 1 received on paradox/event/zone/4 at 1:03 PM:
0
QoS: 0 - Retain: true
Message 0 received on paradox/status at 1:03 PM:
offline
QoS: 0 - Retain: true

Did you delete the retained messages in the broker ?

the broker you mean the there I am taking the logs. right? yes I did.
I also restarted the mosquitto addon
But I still getting these messages :frowning:

Log
[13:22:16] INFO: Setup mosquitto configuration
[13:22:16] WARNING: SSL not enabled - No valid certs found!
[13:22:16] INFO: No local user available
[13:22:16] INFO: Initialize Hass.io Add-on services
[13:22:16] INFO: Initialize Home Assistant discovery
[13:22:16] INFO: Start Mosquitto daemon
1583061736: mosquitto version 1.6.3 starting
1583061736: Config loaded from /etc/mosquitto.conf.
1583061736: Loading plugin: /usr/share/mosquitto/auth-plug.so
1583061736:  ├── Username/password checking enabled.
1583061736:  ├── TLS-PSK checking enabled.
1583061736:  └── Extended authentication not enabled.
1583061736: |-- *** auth-plug: startup
1583061736: Opening ipv4 listen socket on port 1883.
1583061736: Opening ipv6 listen socket on port 1883.
1583061736: Opening websockets listen socket on port 1884.
1583061737: Warning: Mosquitto should not be run as root/administrator.

You really should read up on the workings of mqtt. Restarting the mosquitto broker does not clear the mosquitto database of retained messages. As long as they are present in the database, they will be sent again as soon as mosquitto is up again.

The easiest way to clear the retained messages is to use MQTT Explorer.

to delete a message with a retain flag post an empty message to that topic.
but you only need it for event topics, leave the alarm_status as it is.
when you do that, re-subscribe to all topics and see what’s there regarding your alarm

Thanks both for the help. I just returned home. I will try to apply your suggestion. The technician, will come on Tuesday. I am almost certain that the problem with the alarm (zones are on and off) is an installation related and not to HA and MQTT. Is it possible for my setup to mess with how Paradox reports the zones?

Don’t think so. Just remove everything that you added from HA and check mqtt messages (but clear retained messages as I previously advised).

I am publishing “paradox/event/zone” but nothing changes. I tried with paradox/event/zone1 etc and again the messages are there when I subscribe to # (all)
Am I doing something wrong? (sorry for your time consumption)

you need to publish an empty string ‘’

I can not reset it. I send the empty string with the same outcome. I think I leave it this way and see what will happen on Tuesday when the technician arrives.I really hope that he can fix the alarm