Connect devices over MQTT

Your Coiaca Cloud HA includes its own MQTT broker, and the Home Assistant MQTT integration is already connected to it. All you need to do is enter the broker details on each device. The panel labels below are the English ones.

Connection details

Servermqtt.YOUR-ID.coiaca.app
Port8883
TLS (encryption)On
Userthings
PasswordThe one your panel shows

YOUR-ID is your instance ID. See Your addresses and how to sign in.

See the password

  1. In the Home Assistant sidebar, open Coiaca Cloud HA.
  2. Tap Access: MQTT and files.
  3. Press Show passwords. They appear on the same page, under Result, and are hidden after 15 minutes.

You’ll see two users: things is for your devices and explorer is for checking the broker with MQTT Explorer.

Before you set up a device

  • Enter the server name, not an IP address: the certificate is issued for that name.
  • The certificate is from Let’s Encrypt. If your device asks for the root certificate, it’s ISRG Root X1.
  • The device connects from your home out to the internet. You don’t need to open ports on your router.

Tasmota

  1. Open the device’s web page using its address on your network and go to Configuration → MQTT.
  2. If there’s a TLS checkbox (found in builds for ESP32 boards), tick it and use the details in the table.
  3. If there isn’t one, which is usual on ESP8266 boards, use the unencrypted port.
  4. Save. The Home Assistant Tasmota integration discovers the device and its entities.

Shelly

On the device’s web page, turn on MQTT and enter the details in the table. Second-generation and later models support TLS: turn it on and use port 8883. First-generation models need the unencrypted port. Option names vary by model: check its documentation.

ESPHome

By default, ESPHome uses a connection to Home Assistant that only works inside your network. To use it with your cloud instance, replace the api component with mqtt in the device configuration. This step is for people who already know their way around ESPHome.

Check that it works

  • In Home Assistant, open Settings → Devices & services and look under MQTT (or Tasmota). Devices that send discovery messages show up on their own.
  • To see the messages, use MQTT Explorer with the same server, port 8883, TLS encryption on and the explorer user.

Devices without TLS: the unencrypted port

Use it only if your device doesn’t support TLS. The password and messages travel unencrypted over the internet: someone along the way could read them and publish messages with that account. Don’t use it for anything that switches something important on or off.

  1. In Coiaca Cloud HA, tap Unencrypted MQTT.
  2. Press Enable and confirm.
  3. Under Connection details you’ll see the server, your instance’s own port, the devices user and its password.
  4. Enter those details on the device, without TLS.

The devices user has its own password, different from the things one. When you no longer need the port, press Disable: it closes and the devices using it are disconnected.

Change the things password

In Access: MQTT and files, type the new password (at least 10 characters) and press Save things password. Devices using that user stop connecting until you give them the new one.

If a device won’t connect

  • Check the server name and that it includes your ID.
  • Port and encryption must match: 8883 with TLS, or your unencrypted port without TLS.
  • User and password go together: things for port 8883 and devices for the unencrypted port.
  • Check that the device has internet access.
  • If it still won’t connect, write to support@coiaca.com with your ID, the device model and its firmware. Don’t send passwords.