Skip to content
Peter Price edited this page Nov 13, 2024 · 13 revisions

MQTT Broker

To use MQTT as the host interface you need an MQTT Broker in your network

There are a number of choices including:

Home Assistant MQTT Broker Addon

This is normally only available if you are running Home Assistant OS. It's not available if you are running Home Assistant in a container such as docker.

See Home Assistant Add-on: Mosquitto broker for installation instructions.

Mosquitto

An open source implementation of both an MQTT Broker and a client

Installation depends on your platform/OS.

See here Mosquitto download.

Installing Mosquitto will also give you access to command line subscribe and publish tools.

MQTT Explorer

A useful graphical interface that will allow you to test and control MQTT devices.

MQTT Explorer allows you to easily subscribe to and publish MQTT topics.

There is a Home Assistant Addon for MQTT Explorer

MQTT Topics

When an MQTT broker is configured the device will publish the following tree

RAMSES
  |
  -- GATEWAY
       |
       -- <gateway id>
	      |
              -- info
              |    |-- firmware
              |    |-- version
              |
              -- cmd
              |    |-- result
              |
              -- rx

and will subscribe to the following tree

RAMSES
  |
  -- GATEWAY
       |
       -- <gateway id>
	      |
              -- cmd
              |    |-- cmd
              |
              -- tx

gateway id

This is the gateway e.g. 18:123456

The device publishes the value online to this field when it connects to the broker.

If the connection from the device is lost the broker will change this value to offline.

You can find the device_id value and status for all registered devices by subscribing to RAMSES\GATEWAY\+

cmd

Any command that can be issued via the serial interface can be published via cmd/cmd. Obviously, commands that affect the wifi or MQTT configuration should be avoided.

The CLI produces a basic JSON response in cmd/result

{
  "cmd":<echo of cmd/cmd>,
  "err":<menu system result>,
  "return":<command result code>
}

rx

Radio messages received by the device are published by the device here in JSON format

{
  "msg": "<received message as reported in serial interface",
  "ts": "<device time when RX completed>"
}

tx

Radio messages to be transmitted by the device are published here by the host application in JSON format

{
  "msg": "<message to be transmitted as sent to the serial interface"
}

Clone this wiki locally