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()
Metadata
Release files for lifesospy 0.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lifesospy-0.10.1.tar.gz | 38.6 kB | Without provenance | Details for lifesospy-0.10.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lifesospy-0.10.1-py3-none-any.whl | Python 3 | none | any | Details for lifesospy-0.10.1-py3-none-any.whl |
Total release size: 84.8 kB
Release files / lifesospy-0.10.1.tar.gz
| Download URL | lifesospy-0.10.1.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19ff611bfe9370bcb94d1d836904938b6c8f0c6fa0abe5358fa577436c74e161
|
|
BLAKE2b-256 checksum How to use checksums |
e405b6a90c4d9334423445eabe4e0fdbb8631d8cae4f6f6cac75c9dc279fbdbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / lifesospy-0.10.1-py3-none-any.whl
| Download URL | lifesospy-0.10.1-py3-none-any.whl |
|---|---|
| Size | 46.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fe7723c7a262a184177d62e1a3ccb110d35cf0338ff9b6d6c97997c7faedd29
|
|
BLAKE2b-256 checksum How to use checksums |
0027ca6e2cbab9dbdfa67d446cb44b15d417c607f83f5d55a7998852390fc981
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for lifesospy 0.10.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.