A simple library for the Visonic Alarm API written in Python 3.
Project description
Visonic Alarm Library
Information
A simple library for the Visonic PowerMaster API written in Python 3. It is only tested with a PowerMaster-10 using a PowerLink 3 IP module. The PowerLink 3 is a requirement for this library to work.
Installation
Install with pip3
$ sudo pip3 install visonicalarm
Code examples
Current status
Getting the current alarm status. Available states are 'armed_away', 'armed_home', 'arming_exit_delay_away', 'arming_exit_delay_home' or 'disarmed'.
#!/usr/bin/env python3
from visonic import alarm
hostname = 'visonic.tycomonitor.com'
user_code = '1234'
user_id = '2d978962-daa6-4e18-a5e5-b4a99100bd3b'
panel_id = '123456'
partition = 'P1'
api = alarm.API(hostname, user_code, user_id, panel_id, partition)
res = api.login()
if api.is_logged_in():
print('Logged in')
else:
print('Not logged in')
print(api.get_status())
Example output:
{
'is_connected': True,
'exit_delay': 30,
'partitions': [
{
'partition': 'ALL',
'active': True,
'state': 'Disarm',
'ready_status': True
}
]
}
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
visonicalarm-2.0.0.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for visonicalarm-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eb66b1ad7b1117153af75b3c15084845095e64b7b844882cb6603367b913711 |
|
MD5 | e6d5e96d038e0ad6b1c38ed533245558 |
|
BLAKE2b-256 | 5ae7aba2c5fc6f01fea7f6d1adb1ffc0c4aa4377f4829266982d5dcd98a87ae4 |