Connnecting HiveMQ to Homeassistant failing

Hi, I have a HiveMQ cluster. I am trying to connect my homeassistant to the HiveMQ broker but I am getting the “connection failed” error every time for no apparent reason , I am able to connect to the HiveMQ broker using other devices just fine. I am aware that MQTT setup through yaml has depreciated.

Hi @Exiatron00

It’s fantastic to hear that you’re interested in MQTT and the HiveMQ broker. Welcome to the HiveMQ Community! We’re thrilled to have you join us.

Which HiveMQ product are you using: Cloud, On-Premises, or Community Edition?

For HiveMQ Cloud, here are the steps to connect to Home Assistant: How to Use HiveMQ Cloud MQTT Broker with Home Assistant

I hope it helps
Best,
Dasha from The HiveMQ Team

Hi @ Daria_H,
in the How to you provided is again the configuration.yaml edited, as Exiatron00 pointed out, this seems tob be depreciated and is not working any more. Home Assistant only allows a configurations via the UI, but it doesn’t seem to work. Do you or anyone else has a solution for this problem?

Hi @questenmark5555

Here’s the configuration I set up in my Home Assistant configuration.yaml file to successfully connect to HiveMQ Cloud.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mqtt:
  broker: TYPE_HIVEMQ_CLOUD_BROKER_URL
  port: 8883
  username: TYPE_USERNAME
  password: TYPE_PASSWORD
  certificate: /config/isrgrootx1.pem

Please note that manually configuring MQTT items in configuration.yaml is not deprecated in Home Assistant. However, if you prefer to configure MQTT settings via the Web UI, you must enable the “Advanced Broker Configuration Option” by turning on Home Assistant Advanced Mode in your user profile settings.

Reference Documentation: Manual configured MQTT items and Advanced broker configuration

Kind regards,
Diego from HiveMQ Team