Project: explore the Gallagher Command Centre REST API with curl, then connect Home Assistant read-only

Discuss Gallagher Security Systems
Post Reply
User avatar
ZerOne
Site Admin
Posts: 292
Joined: Sun Dec 13, 2020 8:21 am

A practical plan for trying the Command Centre REST API safely, then connecting the community Home Assistant integration in a read-mostly way. It follows Gallagher's REST API reference and the integration's README, as at October 2026. I have not run it against a Command Centre server, so the details may differ for your version, licences and certificate settings. Use a test or development server if you can.

Safety: this is a production security system. Get written permission from the site owner and your Gallagher integrator. Never test destructive calls on a live site. Doors and alarms must still work with the integration disabled.

Step 1: prepare Command Centre

Gallagher's docs say to search the Configuration Client's online help for "REST" to set up the server. The Home Assistant integration's README describes this flow (menu names may differ by version):
  1. Server Properties > Web Services: enable the REST API and note the server base port.
  2. Create a cardholder named something obvious such as "Home Assistant REST", and give it access to only the groups you need. The README recommends a dedicated access group.
  3. Create an operator group, add that cardholder as an operator, and give it the minimum operator privileges.
  4. Under Services and Workstations add a REST Client, note its API key, set the cardholder as the REST client operator, and on the IP Filtering tab enable filtering and enter the Home Assistant server's IP.
The README's example uses the "REST Client with no client certificate" option. Gallagher's docs say a site may require a pinned client certificate instead, which is a stronger setup, so ask your integrator which is right for your site.

Step 2: look at the API with curl

The reference says the API is self-describing, so you start at /api and follow the href links rather than hard-coding URLs. The doc examples use port 8904 on localhost; use the base port from your server properties. Do not use curl -k. Instead, give curl the server's CA file.

Code: Select all

export CC_KEY='paste-your-key-here'
curl --cacert cc-server-ca.pem \
  -H "Authorization: GGL-API-KEY $CC_KEY" \
  -H "Accept: application/json" \
  https://cc-server.example.lan:8904/api
If your site requires a client certificate, add --cert and --key. The response should be a JSON document with links to the other parts of the API. Follow those links for doors and zones. A 403 Forbidden usually means the licence is missing for that area.

Step 3: connect Home Assistant

Install the integration with HACS as a custom repository, restart, then add "Gallagher Command Centre". Enter the base URL in the form https://[command centre ip]:[rest port]/ and the API key, and select the options you want. The README notes that it imports all items of each selected type (no way to filter them), and only the first 1,000 of each type.

Step 4: choose read-only first

Per the README, doors appear as cover entities, alarm zones as alarm control panels, access zones as locks, fence zones as numeric sensors, inputs as binary sensors, and outputs as switches. Start with inputs, doors and fence voltage as monitoring. Keep the operator privileges low enough that Home Assistant cannot do things you have not approved, even if someone clicks the wrong button.

Step 5: protect the key
  • Store the key in a password manager, not in a shared note.
  • Keep IP filtering on, and give Home Assistant a static IP, as the README suggests.
  • Rotate the key when anyone who knew it leaves.
  • Do not automate door opening from presence sensors or voice assistants.
Known issue to plan for

The README says that if Command Centre is rebooted or offline for a long time, the integration may not re-establish its subscription. Build a simple check that tells you when door or input states have not changed for an unusual time, and know how to reload the integration.

Discussion: which Command Centre version are you on, and do you use client certificates? What licences did the site need before the integration worked?
Post Reply

Return to “Gallagher Security System Discussion”