casa
Control and automate local HomeKit devices using a REST API and command-line interface.
Introduction
Casa is a specialized macOS utility designed for power users, automation engineers, and developers who require direct, programmatic access to HomeKit accessories. By exposing a local-only REST API and a robust CLI, it bridges the gap between Apple's Home ecosystem and custom automation workflows. Whether you are building local scripts to toggle smart lights based on system events, logging device states, or integrating HomeKit into a larger home automation framework, Casa provides the necessary low-level access without requiring complex cloud services or third-party bridges.
The application functions as a local server that binds exclusively to the loopback interface (127.0.0.1:14663), ensuring that your home automation data remains entirely on your machine. Once installed and granted the necessary HomeKit permissions, it allows for granular control over characteristics, room categorization, and accessory management.
-
REST API support for reading/writing characteristics, listing accessories, and querying device schemas.
-
Integrated command-line interface for rapid scripting and terminal-based automation.
-
Compatible with standard macOS HomeKit entitlements and user-defined home configurations.
-
Loopback-only networking architecture ensures local data privacy and security.
-
Supports JSON output for easy integration with data processing tools like jq.
-
Ensure the Casa application is running in the background to keep the API server active.
-
Use the health check endpoint or 'casa health' command to verify connectivity.
-
Secure your local API by configuring an authentication token in the application settings.
-
Treat accessory characteristic IDs as stable values, re-caching only when hardware is physically added or removed.
-
Note that media streaming for HomeKit cameras is not supported via the API; for camera feeds, direct RTSP or HTTP streams are recommended.
-
For development, use the provided environment variables CASA_URL and CASA_TOKEN to authenticate and target the local API from external scripts.
Repository Stats
- Stars
- 36
- Forks
- 22
- Open Issues
- 2
- Language
- Swift
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 06:51 PM