Unofficial Python module designed to interact with the Ksenia Lares alarm system via API.
- Supports IP series (Ksenia Lares 16 IP, 48 IP & 128 IP)
- NO SUPPORT FOR Ksenia Lares 4.0 currently
- Fetch alarm system info (e.g., name, version, MAC address).
- Retrieve and manage zone statuses.
- Activate scenarios and partitions.
- Bypass zones as needed.
Clone the repository and install locally:
git clone https://github.com/yourusername/ksenia_lares.git
cd ksenia_lares
pip install .
import asyncio
from ksenia_lares.ip_api import IpAPI
async def main():
config = {
"username": "your_username",
"password": "your_password",
"host": "192.168.1.1",
"port": 8080,
}
api = IpAPI(config)
# Fetch alarm system info
info = await api.info()
print("Alarm Info:", info)
# Retrieve zone statuses
zones = await api.get_zones()
for zone in zones:
print(f"Zone {zone.id}: {zone.status}")
# Activate a scenario
success = await api.activate_scenario(scenario=1, code="1234")
print("Scenario Activated:", success)
asyncio.run(main())
To contribute to this project, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/ksenia_lares.git
cd ksenia_lares
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate
# On Windows: venv\Scripts\activate
- Install dependencies:
pip install -e '.[dev]'
- Run tests to ensure everything is working:
pytest
This project is licensed under the MIT License. See the LICENCE file for details.