Skip to main content

Provides an interface to LifeSOS alarm systems.

Project description

A Python library to communicate with LifeSOS alarm systems. In some markets, they may also be labelled under the name of the distributor; eg. SecurePro in Australia, WeBeHome in northern Europe.

It was written for & tested with the LS-30 model, though it should also work on the LS-10/LS-20 models.

The base unit must be connected to your network in order for this library to communicate with it; serial connections are not currently supported.

Note: This library is intended for developer use. If you’re just looking to access your LifeSOS alarm system, devices and switches from other applications, I’d suggest taking a look at LifeSOSpy_MQTT instead. It provides an MQTT Client implementation that easily integrates with applications that support MQTT (eg. Home Assistant, OpenHAB).


When using this library in your app there are three main classes to choose from:

BaseUnit

Provides higher level access to the alarm system, managing the Client / Server connection for you. It will automatically enumerate all attached devices on connection, monitor the state of the base unit & devices with notification when they change, and automatically attempt reconnection (when running as client).

This class was created to simplify integration into home automation software.

Client / Server

These two classes allow you to directly issue commands to the alarm system, and attach callbacks to handle any events if needed.

Simple Client Examples

Display the current mode

from lifesospy.client import Client
from lifesospy.command import GetOpModeCommand

client = Client('192.168.1.100', 1680)
await client.async_open()
response = await client.async_execute(GetOpModeCommand())
print("Operation mode is {}".format(str(response.operation_mode)))
client.close()

Operation mode is Disarm

Arm the system

from lifesospy.client import Client
from lifesospy.command import SetOpModeCommand
from lifesospy.enums import OperationMode

client = Client('192.168.1.100', 1680)
await client.async_open()
await client.async_execute(SetOpModeCommand(OperationMode.Away))
client.close()

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

lifesospy-0.10.1.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

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

lifesospy-0.10.1-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file lifesospy-0.10.1.tar.gz.

File metadata

  • Download URL: lifesospy-0.10.1.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.3

File hashes

Hashes for lifesospy-0.10.1.tar.gz
Algorithm Hash digest
SHA256 19ff611bfe9370bcb94d1d836904938b6c8f0c6fa0abe5358fa577436c74e161
MD5 32d6a083b53803cdc2ca1c95a8f7166f
BLAKE2b-256 e405b6a90c4d9334423445eabe4e0fdbb8631d8cae4f6f6cac75c9dc279fbdbc

See more details on using hashes here.

File details

Details for the file lifesospy-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: lifesospy-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.3

File hashes

Hashes for lifesospy-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fe7723c7a262a184177d62e1a3ccb110d35cf0338ff9b6d6c97997c7faedd29
MD5 93e7a2e0ea73889844fc8668b371edd4
BLAKE2b-256 0027ca6e2cbab9dbdfa67d446cb44b15d417c607f83f5d55a7998852390fc981

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