Skip to main content

Home Assistant and Loxone

Home Assistant​

There are two ways. Pick one: with both, every tracker shows up twice.

Each tracker appears in Home Assistant by itself, as a device with a location (device_tracker, so zones work) and the same sensors as the Ciconia integration. Nothing to install besides an MQTT broker.

  • Home Assistant app: install and start the Mosquitto broker app, accept the MQTT integration Home Assistant offers, and restart the Private Relay app. That's all.

  • Docker: give the relay your broker:

    RELAY_MQTT_URL=mqtt://192.168.1.20:1883
    RELAY_MQTT_USERNAME=relay
    RELAY_MQTT_PASSWORD=...

Renaming a tracker in the panel renames its device, and removing a tracker removes it. When the relay stops, its trackers show as unavailable.

The panel's Open in Home Assistant link on each tracker goes to its device page (Home Assistant app only), and the Visit link on the device page opens the panel.

MQTT topics​

For Node-RED, openHAB or anything else that speaks MQTT. All are retained.

TopicWhat
ciconia/statusonline or offline
ciconia/<device_id>/stateThe tracker as JSON: the same fields as the API, plus status (moving, stopped, offline, no_fix) and area
ciconia/<device_id>/locationlatitude, longitude, gps_accuracy, battery_level, altitude, speed, fixed_time
homeassistant/device/ciconia_<device_id>/configHome Assistant discovery

RELAY_MQTT_TOPIC and RELAY_MQTT_DISCOVERY_PREFIX change the first part.

With the Ciconia integration​

The same integration that reads the Ciconia App reads your Private Relay. Using the Home Assistant app? Turn off Home Assistant through MQTT in its options first.

  1. Install the Ciconia integration and restart Home Assistant.
  2. Go to Settings → Devices & services → Add integration → Ciconia.
  3. Open Advanced and set Server address to the address shown on the panel's Integrations page, for example http://192.168.1.20:8080.
  4. Click Submit. The panel shows the request with its code: check it's the same code Home Assistant shows and click Allow.

All your trackers appear in Home Assistant, and trackers you add later appear by themselves.

Moving from the Ciconia Plan? Delete the Ciconia App entry and add the integration again with the relay's address (Reconfigure only moves an entry to another address of the same account). Entity IDs follow the tracker names, so give the trackers the same names in the relay and your automations keep working. Connected Home Assistants are listed on the panel's Integrations page, each with a Disconnect button.

Loxone​

The Miniserver reads the relay with the same Virtual HTTP Input as the Ciconia App. The inputs are the same too: see Inputs.

  1. In the panel, open Integrations and click Download template.
  2. In Loxone Config, import VI_Ciconia.xml under Virtual Inputs → Virtual HTTP Input Templates → Import Template…, add Ciconia from the same menu and save to the Miniserver.

The address inside the template only works on your home network, but treat the file like a key anyway: anyone with it on your network can read your trackers.

The panel says Template out of date after you add, rename or remove a tracker or an area. Download the template again and import it; existing inputs keep their wiring.

Home Assistant app

In the Home Assistant app, the panel is about Home Assistant and leaves Loxone out, but the relay still serves it. Publish port 8080 under the app's Network settings and restart the app, then download the template from http://<Home Assistant's address>:8080/loxone/template.

Your own scripts​

The relay serves the parts of the Ciconia API that Home Assistant needs: the list of trackers and each tracker's latest position. History and personal API tokens are only in the Ciconia App. For your own scripts, MQTT is usually the easier way in.