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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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