A python library to communicate with Risco Cloud.
Project description
PyRisco
A python interface to Risco alarm systems through Risco CLoud.
Installation
You can install pyrisco from PyPI:
pip3 install pyrisco
Python 3.7 and above are supported.
How to use
from pyrisco import RiscoAPI
r = RiscoAPI("<username>", "<password>", "<pincode>")
# you can also pass your own session to login. It will not be closed
await r.login()
alarm = await r.get_state()
print(alarm.partitions[0].armed)
events = await r.get_events("2020-06-17T00:00:00Z", 10)
print(events[0].name)
print(alarm.zones[0].name)
print(alarm.zones[0].triggered)
print(alarm.zones[0].bypassed)
# arm partition 0
await r.arm(0)
# and disarm it
await r.disarm(0)
# Partial arming
await r.partial_arm(0)
# Group arming
await r.group_arm(0, "B")
# or a zero based index
await r.group_arm(0, 1)
# Don't forget to close when you're done
await r.close()
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
pyrisco-0.2.0.tar.gz
(5.6 kB
view hashes)