Skip to main content

Python library to retrieve and interact with securitas devices.

Project description

Securitas Direct API Client

Client to access Securitas Direct through the API used by the following mobile Apps:

If you have a working account in the app, the client should work as well.

API specification and known projects

NOTE: THIS PROJECT IS NOT IN ANY WAY ASSOCIATED WITH OR RELATED TO THE SECURITAS DIRECT-VERISURE GROUP COMPANIES. The information here and online is for educational and resource purposes only and therefore the developers do not endorse or condone any inappropriate use of it, and take no legal responsibility for the functionality or security of your alarms and devices.

Installing and Supported Versions

pysecuritas is available on PyPI and officially supports Python 2.7 & 3.5+:

$ python -m pip install pysecuritas

Usage

Command line

usage: pysecuritas [options]

Python library to retrieve and interact with securitas devices.

positional arguments:
  command               ARM: arm all sensors (inside)
                        ARMDAY: arm in day mode (inside)
                        ARMNIGHT: arm in night mode (inside)
                        PERI: arm (only) the perimeter sensors
                        DARM: disarm everything (not the annex)
                        ARMANNEX: arm the secondary alarm
                        DARMANNEX: disarm the secondary alarm
                        EST: return the panel status
                        ACT_V2: get the activity log
                        SRV: SIM Number and INSTIBS
                        MYINSTALLATION: Sensor IDs and other info
                        IMG: Take a picture (requires -s)

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Username used in the web page/mobile app.
  -p PASSWORD, --password PASSWORD
                        Password used in the web page/mobile app.
  -i INSTALLATION, --installation INSTALLATION
                        Installation/Facility number (appears on the website).
  -c COUNTRY, --country COUNTRY
                        Your country: ES, IT, FR, GB, PT ...
  -l LANGUAGE, --language LANGUAGE
                        Your language: es, it, fr, en, pt ...
  -s SENSOR, --sensor SENSOR
                        The sensor ID (to take a picture using IMG)

Example:

$ ./pysecuritas.py -u michael -p mypassword -i 12345 -c GB -l en EST

You'll get a json with the API output:

{
  "RES": "OK",
  "STATUS": "0",
  "MSG": "Your Alarm is deactivated",
  "NUMINST": "12345"
}

API

You can use it as well as a python class so you can use it in your integrations: There three main api endpoints:

  • alarm: provides access to alarm actions such as arm and disarm
  • camera: takes snapshots from camera sensors
  • installation: retrieves basic information about the installation

Example getting alarm status:

>>> from pysecuritas.core.session import Session
>>> from pysecuritas.api.alarm import Alarm
>>> session = Session(username, password, installation, country, language, sensor)
>>> session.connect()
>>> output = Alarm(session).get_status()
>>> output
OrderedDict([('RES', 'OK'), ('STATUS', '0'), ('MSG', 'Your Alarm is deactivated'), ('NUMINST', '12345')])

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

pysecuritas-0.1.6.tar.gz (10.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pysecuritas-0.1.6-py3.7.egg (25.4 kB view details)

Uploaded Egg

pysecuritas-0.1.6-py2.py3-none-any.whl (13.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pysecuritas-0.1.6.tar.gz.

File metadata

  • Download URL: pysecuritas-0.1.6.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.1

File hashes

Hashes for pysecuritas-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5b70cb6425d41fdcb934f8a9144bba51198a37ea155cc81e0c5d6b7cab714678
MD5 87b3b276813882f0fb388f736053b129
BLAKE2b-256 adaf0c86135c2567ff9cad53361dbaf65d4b86736f802c203ca1441b304c9917

See more details on using hashes here.

File details

Details for the file pysecuritas-0.1.6-py3.7.egg.

File metadata

  • Download URL: pysecuritas-0.1.6-py3.7.egg
  • Upload date:
  • Size: 25.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.1

File hashes

Hashes for pysecuritas-0.1.6-py3.7.egg
Algorithm Hash digest
SHA256 18dade7d89226e520ee37de9cc7dcb3a3ede072f7e9628a09c8596aeee8c9b51
MD5 851718b2331a8ee5b1bc21d13b99c2a1
BLAKE2b-256 699270ca0268d3ace186507c0c0db4e3e511bf68cda4d911c874f8ee935d30bd

See more details on using hashes here.

File details

Details for the file pysecuritas-0.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: pysecuritas-0.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.1

File hashes

Hashes for pysecuritas-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4daccd1b248991164767f3e69d9d2d73d77d233092ab51dbed5d209ef77f271e
MD5 e0d02d5a905329a9e1a103ddb7291bae
BLAKE2b-256 2de0bb1f54bbe4db10b1b57a9972a6eb261f63369a071e503df9eae561cbbb94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page