Meiantech, iAlarm, Antifurto365, AllarmiWireless and other alarm systems support
Project description
# Python client for iAlarm
Also compatible with Meiantech, Allarmi365, and others
## Usage example
```
#!/usr/bin/env python
import asyncio
from ialarmclient import IalarmClient
async def start():
ialarm = IalarmClient(
username="username", # <- Your alarm web interface username
password="password", # <- Your alarm web interface password
url="http://192.168.123.123" # <- Your alarm web interface URL (no trailing slash)
)
# Refresh alarm status, to be called every time you need to read updated information
# May take up to 30-40 seconds the first time. Subsequent calls will be almost immediate.
await ialarm.refresh()
# Retrieve information about your alarm zones (name, status, etc...)
zones = await ialarm.get_zones()
for zone in zones:
if zone.type != ialarmclient.ZONE_TYPE_DISABLED:
print("Zone {} is {}".format(zone.number, zone.name))
# Other information can be read (see IalarmZone)
# Retrieve alarm status (armed, disarmed, power failure, etc...)
status = await ialarm.get_status()
# Commands to arm/disarm your system
await ialarm.arm_stay()
await ialarm.arm_away()
await ialarm.disarm()
await ialarm.cancel_alarm()
# List all zones in alarm
status = await ialarm.get_status()
for alarmed_zone in status.alarmed_zones:
print("Zone {} is alarmed".format(alarmed_zone.name))
# Status information for your system
if status.power_source_failure:
print("Power failure")
if status.low_battery:
print("Low battery")
if status.panic_alarm:
print("Panic alarm triggered")
if status.arm_status == ialarmclient.STATUS_ARMED_AWAY:
print("System armed")
elif status.arm_status == ialarmclient.STATUS_ARMED_STAY:
print("System armed (STAY)")
elif status.arm_status == ialarmclient.STATUS_DISARMED:
print("System disarmed")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(start())
```
Also compatible with Meiantech, Allarmi365, and others
## Usage example
```
#!/usr/bin/env python
import asyncio
from ialarmclient import IalarmClient
async def start():
ialarm = IalarmClient(
username="username", # <- Your alarm web interface username
password="password", # <- Your alarm web interface password
url="http://192.168.123.123" # <- Your alarm web interface URL (no trailing slash)
)
# Refresh alarm status, to be called every time you need to read updated information
# May take up to 30-40 seconds the first time. Subsequent calls will be almost immediate.
await ialarm.refresh()
# Retrieve information about your alarm zones (name, status, etc...)
zones = await ialarm.get_zones()
for zone in zones:
if zone.type != ialarmclient.ZONE_TYPE_DISABLED:
print("Zone {} is {}".format(zone.number, zone.name))
# Other information can be read (see IalarmZone)
# Retrieve alarm status (armed, disarmed, power failure, etc...)
status = await ialarm.get_status()
# Commands to arm/disarm your system
await ialarm.arm_stay()
await ialarm.arm_away()
await ialarm.disarm()
await ialarm.cancel_alarm()
# List all zones in alarm
status = await ialarm.get_status()
for alarmed_zone in status.alarmed_zones:
print("Zone {} is alarmed".format(alarmed_zone.name))
# Status information for your system
if status.power_source_failure:
print("Power failure")
if status.low_battery:
print("Low battery")
if status.panic_alarm:
print("Panic alarm triggered")
if status.arm_status == ialarmclient.STATUS_ARMED_AWAY:
print("System armed")
elif status.arm_status == ialarmclient.STATUS_ARMED_STAY:
print("System armed (STAY)")
elif status.arm_status == ialarmclient.STATUS_DISARMED:
print("System disarmed")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(start())
```
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ialarmclient-phoenix-1.0.0.tar.gz.
File metadata
- Download URL: ialarmclient-phoenix-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a508a85b20ea87bfc9ae0f2e0a32cea3c44fafdb19e26dcc4aff69ac930afdd1
|
|
| MD5 |
ebaf122c67ea67b34f945657022c5929
|
|
| BLAKE2b-256 |
6ff4a0a710d6a2ca1b3166c1b166b55f9cf485cc9d3e46eb024619cccf17c7bb
|
File details
Details for the file ialarmclient_phoenix-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ialarmclient_phoenix-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a87f88a9eba0b66a2f4bceaec192efdc5357cca2ec87b740fb44a6a6282e3e5
|
|
| MD5 |
bd504d15312e903a9feae3ae9417d9e8
|
|
| BLAKE2b-256 |
ca530da0316dc0711974fd2dc8c59522f57b7f0b8ded5147ad9d14b4111f543d
|