Skip to main content

Async Python client and protocol helpers for Jablotron RS485-over-TCP integrations

Project description

JabloPy - Simple interface for Jablotron alarm systems

This service enables 2-way communication with a Jablotron alarm system without relying on cloud services or reverse-engineered APIs.

It exposes:

  • The alarm system itself (supports arming and disarming of sections)
  • Sensors (motion sensors, contact sensors, smoke and fire alarm, sirens, ...)
  • System flags (arming delay, entry delay, ...)
  • System state (armed, disarmed, alarm, ...)

Requirements

  • A JA-121-T interface module must be installed
  • A bridge device that can translate the RS-485 bus to tcp (For instance: A Waveshare RS485 to WiFi/Ethernet Module)

Installing and running

Create a virtual environment and install the project in editable mode:

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"

Run the interactive CLI:

jablopy --host 192.168.1.140 --port 8899 --pin 1234

Use --connect-timeout to stop waiting after a fixed number of seconds if the initial connection cannot be established:

jablopy --host 192.168.1.140 --port 8899 --pin 1234 --connect-timeout 10

Alternative ways to run the CLI during development:

.\.venv\Scripts\python.exe -m jablopy.cli --host 192.168.1.140 --port 8899 --pin 1234
.\.venv\Scripts\python.exe src\jablopy\cli.py --host 192.168.1.140 --port 8899 --pin 1234

For a PyCharm run configuration, use either:

  • Module name: jablopy.cli
  • Script path: src\jablopy\cli.py

Set the working directory to the project root.

Library usage

from jablopy import JablotronClient, JablotronProtocol

command = JablotronProtocol.build_arm_partial_command("1234", sections=[1])
client = JablotronClient("192.168.1.140", 8899)

The client reconnects automatically when the TCP connection drops. Commands sent while disconnected raise RuntimeError and are not queued.

Responses and errors

Incoming lines are parsed into event objects and dispatched to listeners. This includes responses to commands and unsolicited pushed updates from the alarm system.

Response Event
OK HeartbeatEvent
STATE 1 ARMED_PART SectionStateEvent
EXIT 1 ON FlagEvent
PRFSTATE 28 PrfStateEvent
ERROR CommandErrorEvent
ERROR: 3 NO_ACCESS CommandErrorEvent

Commands

Supported commands

Control commands:

Command Description
SET Arm system fully
SETP Arm system partially
UNSET Disarm system

Usage:

<userId>*<pin> <command> <sections>

Query commands:

Command Description
VER Get version info from device
HELP Get list of valid commands
STATE Get current state of each section
FLAGS Get active system flags
PRFSTATE Get device and sensor states

Usage:

<command>

Example commands

# Partially arm section 1 with user 2 and pin 1234
2*1234 SETP 1 

# User can be left out if there is only one
1234 SETP 1

# Disarm section 1
1234 UNSET 1

# Get flags
FLAGS

# Get device and sensor states
PRFSTATE

Statuses

Section statuses

Status Description
READY Normal mode
ARMED_PART Partially set
ARMED Set
MAINTENANCE Maintenance
SERVICE Service
BLOCKED Blocked after an alarm
OFF Section disabled

Flags

Flag Description
INTERNAL_WARNING Internal siren active
EXTERNAL_WARNING External siren active
FIRE_ALARM Fire alarm
INTRUDER_ALARM Intruder alarm
PANIC_ALARM Panic alarm
ENTRY Entrance delay
EXIT Exit delay

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

jablopy-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

jablopy-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file jablopy-0.1.0.tar.gz.

File metadata

  • Download URL: jablopy-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for jablopy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04ccc0bada95a176f24d642dbb3699a6fde8d2eff09891b7cc2a85aed5f86001
MD5 805383727c3a4499e3a634053ed55d31
BLAKE2b-256 faae15b5ea9e3ac10786eba8c0395a2f5151e57aeee07df68d39ed50a2e755f3

See more details on using hashes here.

File details

Details for the file jablopy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jablopy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for jablopy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c59a384260e4e7542de07c1d365c7af7d25e47512c03ccb924d458be5ce6d09
MD5 d3b7ac0b547b97859095799c338193f7
BLAKE2b-256 5dc0b7f8b39e2f0a9d1f615ab4dbc088ae968a3338c0d8fe59028ba730404788

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