MQTT is the messaging protocol the Index AMI uses to publish meter readings and receive configuration commands from the AMI Platforms. The Index AMI supports MQTT over TCP (unencrypted, port 1883) and MQTT over SSL/TLS (AES-256 encrypted, port 8883). Always use SSL for production environments.
Where to configure it
- App Android: Android app: Main Menu → Connectivity Configuration → enable MQTT checkbox
- Herramienta de escritorio: Desktop tool: template editor → MQTT section.
Enable MQTT
MQTT está deshabilitado por defecto.
- App Android: Android app: enable the «Enable MQTT configuration» checkbox for all fields to appear.
- Herramienta de escritorio: Desktop tool: the MQTT section is always visible in the template editor.
Basic parameters
These fields are required regardless of the transport mode (TCP or SSL).
- MQTT host (broker): MQTT server address. Can be hostname (broker.example.com) or IP (192.168.1.100). Max. 128 characters.
- Port: 1883 for MQTT over TCP. 8883 for MQTT over SSL. Range: 0–4,294,967,295.
- Client ID: Unique identifier for this Index AMI on the broker. Must be unique per device. Max. 64 characters. Example: index-ami-001, device-MET-NORTH-001.
- Username (optional): Broker access credential. Leave empty if broker doesn't require authentication. Max. 64 characters.
- Password (optional): Broker access credential. Leave empty if broker doesn't require authentication. Max. 64 characters.
Transport type
The Transport field determines whether communication is encrypted. This field also controls which additional fields appear on screen.
- MQTT over TCP (port 1883): Unencrypted connection. Certificate fields are hidden automatically. Use only on controlled internal networks or for testing.
- MQTT over SSL (port 8883): TLS-encrypted connection. Certificate fields appear automatically. Recommended for field production.
Changing the transport type automatically updates the suggested port. If your broker uses a non-standard port, change it manually after selecting the transport.
TLS certificates (SSL mode only)
In MQTT over SSL mode the Index AMI needs three files to authenticate the connection. Request them from the MQTT broker administrator.
- CA certificate (.pem / .crt): Certificate of the certifying authority that signed the server certificate. Without this file the Index AMI cannot verify the broker's identity.
- Client certificate (.pem / .crt): Certificate that identifies this Index AMI to the broker. Each device must have its own client certificate.
- Client private key (.key / .pem): Private key corresponding to the client certificate. Keep it secure — never share it in plain text.
- Skip CN verification: If enabled, the Index AMI does not verify that the broker certificate's Common Name matches the configured hostname. Useful for self-signed or internal certificates. Disabled = maximum security.
- Common Name (CN): Server certificate Common Name, only needed when CN verification is enabled. Check with the broker administrator.
Load certificates from the Android app using the search button for each field. The app accepts files with download suffixes (e.g. ca.pem, ca.pem (1)). From the desktop tool, press the search button and select the file. Files are written to the Index AMI first and the configuration is applied when you press «Apply changes».
MQTT topics
The Index AMI publishes and subscribes to the following topics. The base prefix is defined by the AMI Platforms according to your installation convention.
| Topic | Function | Example |
|---|---|---|
| Configuration set | The AMI Platforms publish here to update the Index AMI configuration remotely. | device/config/set |
| Get configuration | The AMI Platforms publish here to request the current Index AMI configuration. | device/config/get |
| Device info | The Index AMI publishes its status here: IMEI, signal, IP, uptime. | device/info |
| OTA update | The AMI Platforms publish new firmware here for remote update. | device/ota/firmware |
| OTA status | The Index AMI publishes update progress and result here. | device/ota/status |
Define topics according to your AMI Platforms convention. Use a structure that includes the device ID to facilitate routing: device/{id}/info, device/{id}/config/set.
Steps — MQTT over TCP
- Connect the Index AMI via BLE and go to Connectivity Configuration.
- Enable the «Enable MQTT configuration» checkbox.
- Enter the MQTT Host (broker address), port 1883, unique client ID, and username/password if the broker requires it.
- Select «MQTT over TCP» in the Transport field. Configure Keepalive (60 s recommended) and topics.
- Press «← Back» and then «Apply changes to device». The Index AMI will restart and connect to the broker.
Steps — MQTT over SSL
- Make sure you have the three certificate files: CA (.pem), client (.pem) and private key (.key).
- Connect the Index AMI via BLE and go to Connectivity Configuration.
- Enable «Enable MQTT configuration», enter Host, port 8883, client ID, username and password.
- Select «MQTT over SSL» in the Transport field — certificate fields will appear.
- Load the three files using the search button for each field. Press the load button to write them to the Index AMI.
- Configure topics, Keepalive and whether you need to skip CN verification. Press «← Back» and «Apply changes to device».
Verify the MQTT connection
In the Android app go to Overview → Connectivity Status tab → MQTT Details section. Confirm that the «Status» field shows «Connected» and that «Last Connection» has a recent date. If the status is «Disconnected», check the broker hostname, port and credentials.
If something is not working
| Symptom | Probable cause | Action |
|---|---|---|
| Status always «Disconnected» after applying configuration | Incorrect broker hostname, port blocked by firewall, or broker not running | Verify the broker is reachable from a 4G network. Test with an MQTT client app on a phone using the same SIM. |
| Certificate failure in SSL mode — handshake rejected | Expired certificates, wrong CA, or Common Name does not match the configured hostname | Verify the CA expiration date. If using self-signed certificates, enable «Skip CN verification» in the configuration. |
| Status «Connected» but AMI Platforms receive no messages | Index AMI topics do not match the topics subscribed on the AMI Platforms — prefix or structure mismatch | Compare the exact topics. Use mosquitto_sub on the broker to inspect traffic in real time. |
Support documents
Next steps
With MQTT active the Index AMI can publish telemetry to the AMI Platforms. Configure alerts to receive notifications for critical events. See the notifications configuration guide to enable Last Gasp, temperature and switch alerts.