MQTT alarm , need some help, new to MQTT

So, i am new to MQTT, created my first alarm panel,
i have found this project, followed the setup , all is working ok, i think
so installed an ubuntu , installed that nodejs on it, created a connection to the MQTT server
mqtt server is installed as addon in HA, its working, i can connect with the hivemq to it, green button

so when i start the app, you see in the log, that it sends a message to MQTT, but the state of my alarm is still unknown, so maybe there is a state issue
next test, is the other way around, so in HA i do a test call service to arm/disarm , but i dont see that message coming in the app lg on ubuntu
so there is something wrong, but i dont know where to look or how to troubleshoot

project alarm = https://github.com/lucacalcaterra/risco-mqtt-bridge

code alarm panel =

alarm_control_panel:
  - platform: mqtt
    state_topic: "riscopanel/armstatus"
    command_topic: "riscopanel/armstatus/SET"
    payload_disarm: "disarmed" 
    payload_arm_home: "partially"
    payload_arm_away: "armed"

screenshot of succesful connection with MQTT and test message

Are the mqtt topics right? open a MQTT client (like mqtt.fx) and subscribe to all topics and view the messages when send.

well, this is all new to me … what are the mqtt topics?
can i use hivemq as test client? thats was installed also as addon in HA

in the config file, from line 51 , are the settings ofMQTT, i changed those offcourse to correct IP and username, so the test connection is OK

so how can i check of the message arrives on MQTT , can i do that with hivemq ?
and what does this mean?
clientId: ‘mqttjs_Risco’,

do i need to enter that also in hivemq?

sorry, new 2 this

I would recommend you read a mqtt basics tutorial. Maybe this one.

But in short; A MQTT topic is a way off ordering your messages on a MQTT network.
Example:
If you have a mqtt light it can post and recieve messages on topic “homeassistant/lights/”
And a lock on topic “homeassistant/locks/”
If you subscribe (mqtt term for only view messages on a specific topic) to topic homeassistant/locks/ you only see the messages for your lock. But is you subscribe to homeassistant/# you will see both the light and lock messages.

If you subscribe with HiveMQ to topic “#”, you will see all messages. Then you will see if the topics from HA and your alarm match. If they don’t, it will not work.
In your configuration file you say the topic for the status off your alarm should be “riscopanel/armstatus” and the topic for arming/disarming/etc. should be “riscopanel/armstatus/SET”

ok thnx for info
ok, so started hivemq, created connection, subscribed to #

then in HA, i do a service call , with the default test

mqtt.publish
=>
{“payload”: “Test message from HA”, “topic”: “home/notification”, “qos”: 0, “retain”: 0}

then i go back to hivemq, but i dont see any messages there ?
there is something wrong, just dont know what

I think HA uses the built in mqtt and not the addon mqtt broker. Can you share the MQTT: section of your configuration file?

i used the integration in HA, so dont have a MQTT section

so in integration , i enabled MQTT, filled in 127.0.0.1 , user/pass/port , all ok there

remove the integration and add this to your configuration file and restart HA:

mqtt:
  broker: a0d7b954-mqtt
  username: your_mqtt_username
  password: your_mqtt_password
  client_id: home-assistant

(replace the username and password)

ok, done, hiveMQ connected again, subscribed to # , then did a test mqtt service call : mqtt.publish

still dont see any messages in hivemq

what is that a0d7b954-mqtt ?

Can you give some details about your HA installation;
Are you using HASSIO?
Are you using this addon?
Did you recieve errors in the HA logs?
Does the addon give errors in its logs?

This the internal name of the addon I mentioned above

no, i am using this addon : https://github.com/hassio-addons/addon-mqtt/blob/master/README.md
yes, using hassio, running on hassos , build 84.2
no error in HA log
also no error in addon log, when i do a test message, dont see anything at all when i do a test message
i see succesful client connected in addon log

so all looks OK

It’s the same addon :wink:

But then I don’t know whats wrong…

If you send a test message in HiveMq, can you see it when you subscribe to “#”? just to test if the broker is working.

No, don’t see it there also… Strange

So HiveMQ is no connected to the broker.
The addon consists of 2 things; HiveMQ (mqtt client) and the mqtt broker/server (mosquitto).
In Hive you have to connect to the mosquitto broker.

Yes, but connection is successful, led is green
So it’s connected?

Strange…
Can you send a test message with Hive and screenshot Hive?

offcourse

here is also config

{
  "log_level": "info",
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "web": {
    "enabled": true,
    "ssl": true
  },
  "broker": {
    "enabled": true,
    "enable_ws": true,
    "enable_mqtt": true,
    "enable_ws_ssl": true,
    "enable_mqtt_ssl": false,
    "allow_anonymous": false
  },
  "mqttusers": [
    {
      "username": "aaa",
      "password": "bbb",
      "readonly": true,
      "topics": [
        "#"
      ]
    }
  ]
}

changed to anonymous connection just for testing, but still the same
when i click on publish test message, i just dont see the test message appearing, subscribed to #

new test, so i stopped the addon, installed mqtt on my ubuntu, follow this 5 min guide
changd in the config yaml file the broker IP address , (ubuntu server) one

restart, and everything is working

so there is definitely something wrong with the addon, dont know why that one is not working

Uncheck the ssl checkbox in Hive, because in your config you have: