Skip to content

MQTT

Homecast publishes real-time device state to MQTT and accepts commands. Compatible with Home Assistant, Node-RED, and any MQTT client.

Connecting

SettingValue
Hostmqtt.homecast.cloud
Port8883 (TLS) or 1883
Username(leave blank)
PasswordYour API access token (hc_...)

Create an access token in Settings → API Access, or in the MQTT Browser → Connection Details.

Example

bash
# Subscribe to all topics
mosquitto_sub -h mqtt.homecast.cloud -p 8883 \
  --cafile /etc/ssl/cert.pem \
  -u "" -P "hc_your_token_here" \
  -t "homecast/#" -v

# Turn off a light
mosquitto_pub -h mqtt.homecast.cloud -p 8883 \
  --cafile /etc/ssl/cert.pem \
  -u "" -P "hc_your_token_here" \
  -t "homecast/my-home-a1b2/living-room-c3d4/desk-lamp-e5f6/set" \
  -m '{"on": false}'

Topics

Follows the Zigbee2MQTT convention: the base topic is the device state, /set is for commands.

Device state

homecast/{home}/{room}/{accessory}

Retained JSON with all characteristics, sorted alphabetically:

json
{"brightness": 80, "color_temp": 200, "on": true}

Device commands

homecast/{home}/{room}/{accessory}/set

Publish a JSON object with the characteristics to change:

json
{"on": false}
{"brightness": 50, "color_temp": 300}

Availability

homecast/{home}/{room}/{accessory}/availability

Retained string: "online" or "offline".

Service groups

Groups control multiple devices at once (e.g., "All Kitchen Lights"):

homecast/{home}/{room}/{group}              # group state
homecast/{home}/{room}/{group}/set          # control all devices in group
homecast/{home}/{room}/{group}/members      # JSON array of member slugs

Scenes

homecast/{home}/scene/{scene}/execute

Publish any payload to trigger the scene.

Home status

homecast/{home}/status

Retained: "online" or "offline". Updated via MQTT Last Will and Testament.

Home Assistant auto-discovery

homeassistant/{component}/homecast_{id}/config

Retained JSON with HA discovery payload. Published automatically when MQTT is enabled. Devices appear in Home Assistant without manual configuration.

Slugs

Topic segments use the format {name}-{first 4 hex of UUID}:

  • county-hall-2d10 (home)
  • kitchen-dfee (room)
  • desk-lamp-e5f6 (accessory)
  • kitchen-lights-182f (service group)

Slugs are stable — renaming a device in HomeKit doesn't change the slug.

Editions

FeatureCommunityCloud
Custom MQTT brokersConnect Mac app to your brokerStore in DB, cloud bridge connects
Homecast Broker (mqtt.homecast.cloud)Not availablePer-home toggle in Settings
MQTT BrowserAt homecast.cloud/mqttAlso at mqtt.homecast.cloud
HA auto-discoveryPublished by Mac appPublished by cloud bridge
Service group supportVia Mac appVia cloud bridge

MQTT Browser

MQTT Browser showing live topic tree

Browse live device state and publish commands at mqtt.homecast.cloud or homecast.cloud/mqtt.

Features:

  • Auto-connects with your Homecast session
  • Filter by home and room
  • Visual controls: toggles for booleans, sliders for brightness/color
  • Raw JSON editor for advanced use
  • Publish history
  • Service group support with member list
  • Connection details dialog with access token management

Enabling MQTT

  1. Go to Settings → Account → enable Developer Mode
  2. Go to Settings → Homes → click your home
  3. Toggle Homecast Broker on
  4. (Optional) Add custom brokers below

MQTT setup in Home settings

Characteristic names

MQTT uses simplified names for HomeKit characteristics:

MQTT nameHomeKit characteristic
onPower state
brightnessBrightness (0–100)
color_tempColor temperature (50–500)
hueHue (0–360)
saturationSaturation (0–100)
current_tempCurrent temperature
heat_targetHeating threshold
cool_targetCooling threshold
positionCurrent position (blinds, 0–100)
targetTarget position
lockedLock state
lock_targetLock target
motionMotion detected
contactContact sensor state
speedFan rotation speed
volumeSpeaker volume
muteMute state
batteryBattery level
activeActive state
alarm_stateSecurity system state
alarm_targetSecurity system target