A Python library for interacting with the Sector Alarm API.
Project description
SectorAlarm Client Application
An interactive command-line application for interacting with Sector Alarm systems using the sectoralarm
library.
Overview
This client application allows users to interact with their Sector Alarm systems via a command-line interface. It provides functionalities to:
- Navigate and view system categories and data
- Arm and disarm the security system
- Lock and unlock doors
- Rebuild the local cache
- Fetch and display data from the system
Features
- Interactive Menu: Navigate through system categories and data interactively.
- Control Actions: Arm/disarm the system and lock/unlock doors directly from the CLI.
- Data Fetching: Fetch and display data for specific categories or the entire system.
- Cache Management: Rebuild and view statistics of the local data cache.
Prerequisites
- Python 3.6 or higher
- sectoralarm library installed
- Internet Connection: Required to communicate with the Sector Alarm API
Installation
Clone the Repository
git clone https://github.com/garnser/sector_alarm.git
cd sector_alarm
Install Dependencies
It's recommended to use a virtual environment.
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install sectoralarm
Configuration
Create a config.json file in the root directory with your Sector Alarm credentials and panel information.
config.json
{
"email": "your_email@example.com",
"password": "your_password",
"panel_id": "your_panel_id",
"panel_code": "your_panel_code"
}
Note: Keep this file secure and do not share it, as it contains sensitive information.
Usage
Run the client application:
python main.py
Main Menu Options
- Select a category: Navigate and view different data categories from your system.
- Rebuild cache: Refresh the local cache of system data structures.
- Show cache statistics: Display statistics about the cached data.
- Lock/Unlock Doors: Control door locks.
- Arm/Disarm System: Control the alarm system status. F. Fetch all data: Retrieve and display all data from all categories.
- Exit: Exit the application.
Navigating Categories
- Select a category to view its sections and items.
- At each level, you can:
- Select a section or item by number to navigate further.
- Press F to fetch and display data for the current level.
- Press 0 to go back to the previous menu.
Example Session
Main Menu:
1. Select a category
2. Rebuild cache
3. Show cache statistics
4. Lock/Unlock Doors
5. Arm/Disarm System
F. Fetch all data
0. Exit
Select an option: 1
Categories:
1. Doors and Windows
2. Temperatures
3. Panel Status
0. Back
Select a category (by number): 1
Doors and Windows > Sections:
1. Front Door
2. Back Door
0. Back
F. Fetch data for this level
Select a section (by number) or F to fetch data: F
Fetching data...
{
"Front Door": "Closed",
"Back Door": "Open"
}
Press Enter to continue...
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This client application is not affiliated with or endorsed by Sector Alarm. Use it responsibly and at your own risk.
Contributing
Contributions are welcome! Please submit a pull request or open an issue on GitHub.
Contact
For questions or suggestions, please contact Jonathan Petersson jpetersson@garnser.se.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sectoralarm-1.1.1.tar.gz
.
File metadata
- Download URL: sectoralarm-1.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235197fc9160364c9bad77a14c24078c575040ce5c4195b18299c5c386c88bfe |
|
MD5 | 407341ec9b32e9229d45c523d834f4ba |
|
BLAKE2b-256 | 137697f5950ab7e61cb3321aa1cb25456de1b4932b821be73ab92d61a58b7c82 |
File details
Details for the file sectoralarm-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: sectoralarm-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe4b6cb9607f32daac8e784b540fa8db66e7d6d8cebdf9d91229ed9d3014268 |
|
MD5 | bb1d69982a37c6fde5020b0559c49d8a |
|
BLAKE2b-256 | 10795cefb7e740106dd07748eff21a991564be621a88d85f325544ab7d798973 |