Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e3131c2
mapped to hacs blueprint
eavanvalkenburg Sep 5, 2019
f16474a
added info
eavanvalkenburg Sep 5, 2019
1d5bd8c
added badge link
eavanvalkenburg Sep 5, 2019
dc1ae74
added hacs.json
eavanvalkenburg Sep 5, 2019
1eecddb
black and changed logging
eavanvalkenburg Sep 5, 2019
a38b711
v1 with control panel, so you can use the visuals
eavanvalkenburg Sep 5, 2019
c4d7ad2
v1 of alarm panel (view only)
eavanvalkenburg Sep 5, 2019
f374e6f
updated info
eavanvalkenburg Sep 5, 2019
0289409
major updates to the component, with breaking config changes
eavanvalkenburg Sep 9, 2019
60b98ed
added ping_interval and fixed #1
eavanvalkenburg Sep 15, 2019
85d405b
small readme fix
eavanvalkenburg Sep 15, 2019
a21274a
fix for #3
eavanvalkenburg Sep 23, 2019
f12f1cf
small fix
eavanvalkenburg Sep 23, 2019
595e7f7
fixes to list index out of range error (issue #3)
eavanvalkenburg Sep 24, 2019
4163d73
first beta of major rewrite
eavanvalkenburg Sep 26, 2019
1a5f277
update to beta version
eavanvalkenburg Sep 26, 2019
1ad5616
rewrite complete, restoreentity not fully working
eavanvalkenburg Oct 4, 2019
df63440
fix for #5
eavanvalkenburg Oct 9, 2019
823865d
fix for error about abstract classes and methods.
eavanvalkenburg Dec 15, 2019
73db176
wip on fixing entity id already exists
eavanvalkenburg Jan 7, 2020
413eb27
fixes for #8 and #9
eavanvalkenburg Jan 7, 2020
b3917c5
new version based on official component
eavanvalkenburg Jun 10, 2020
2c6eeb6
small fixes in line with official PR
eavanvalkenburg Jun 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Issue
about: Create a report to help us improve

---

<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.

Issues not containing the minimum requirements will be closed:

- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- Issues without configuration will be closed

-->

## Version of the custom_component and HA setup (version, OS, etc)
<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the const.py file.
-->

## Configuration

```yaml

Add your configuration here.

```

## Describe the bug
A clear and concise description of what the bug is.


## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text

Add your logs here.

```
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/unhandled_event_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Unhandled event type
about: Create a report to help us support more event types

---

<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.

Issues not containing the minimum requirements will be closed:

- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- Issues without configuration will be closed

-->

## Version of the custom_component
<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the const.py file.
-->

## Configuration

```yaml

Add your configuration here.

```

## Fill in the below info about the unhandled event
SIA codes from your logs or from [SIA](SIA_code.pdf) and [supported alarm states](https://developers.home-assistant.io/docs/en/entity_alarm_control_panel.html) or [supported states for binary_sensors](https://developers.home-assistant.io/docs/en/entity_binary_sensor.html)

SIA Code | sensor_type (alarm, smoke, moisture) | expected state
-- | -- | --

## Debug logs with the requested codes

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text

Add your logs here.

```
23 changes: 23 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repository:
private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
labels:
- name: "Feature Request"
color: "fbca04"
- name: "Bug"
color: "b60205"
- name: "Wont Fix"
color: "ffffff"
- name: "Enhancement"
color: a2eeef
- name: "Documentation"
color: "008672"
- name: "Stale"
color: "930191"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
61 changes: 61 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Home Assistant on port 8124",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && StartHomeAssistant",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && UpdgradeHomeAssistantDev",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Set Home Assistant Version",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && SetHomeAssistantVersion",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Home Assistant Config Check",
"type": "shell",
"command": "source .devcontainer/custom_component_helper && HomeAssistantConfigCheck",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contribution guidelines

Contributing to this project should be as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features

## Github is used for everything

Github is used to host code, to track issues and feature requests, as well as accept pull requests.

Pull requests are the best way to propose changes to the codebase.

1. Fork the repo and create your branch from `master`.
2. If you've changed something, update the documentation.
3. Make sure your code lints (using black).
4. Issue that pull request!

## Any contributions you make will be under the MIT Software License

In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](../../issues)

GitHub issues are used to track public bugs.
Report a bug by [opening a new issue](../../issues/new/choose); it's that easy!

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports. I'm not even kidding.

## Use a Consistent Coding Style

Use [black](https://github.com/ambv/black) to make sure the code follows the style.

## License

By contributing, you agree that your contributions will be licensed under its MIT License.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Joakim Sørensen @ludeeus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
81 changes: 45 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,63 @@
# sia-ha
SIA alarm systems integration into Home Assistant
Based on https://github.com/bitblaster/alarmreceiver
[![hacs][hacsbadge]](hacs)

_Component to integrate with [SIA][sia], based on [CheaterDev's version][ch_sia]._

_Latest beta will be suggested for inclusion as a official integration._

**This component will set up the following platforms.**

## WARNING
This integration may be unsecure. You can use it, but it's at your own risk.
This integration was tested with Ajax Systems security hub only. Other SIA hubs may not work.

Platform | Description
-- | --
`binary_sensor` | A smoke and moisture sensor, one of each per account and zone.
`alarm_control_panel` | Alarm panel with the state of the alarm, one per account and zone.
`sensor` | Sensor with the last heartbeat message from your system, one per account.

## Features
- Alarm tracking with a alarm_control_panel component
- Fire/gas tracker
- Water leak tracker
- Alarm tracking
- Armed state tracking
- Partial armed state tracking
- AES-128 CBC encryption support

## Hub Setup(Ajax Systems Hub example)
## Hub Setup (Ajax Systems Hub example)

1. Select "SIA Protocol".
2. Enable "Connect on demand".
3. Place Account Id - 3-16 ASCII hex characters. For example AAA.
4. Insert Home Assistant IP adress. It must be visible to hub. There is no cloud connection to it.
4. Insert Home Assistant IP address. It must be a visible to hub. There is no cloud connection to it.
5. Insert Home Assistant listening port. This port must not be used with anything else.
6. Select Preferred Network. Ethernet is preferred if hub and HA in same network. Multiple networks are not tested.
7. Enable Periodic Reports. It must be smaller than 5 mins. If more - HA will mark hub as unavailable.
7. Enable Periodic Reports. The interval with which the alarm systems reports to the monitoring station, default is 1 minute. This component adds 30 seconds before setting the alarm unavailable to deal with slights latencies between ajax and HA and the async nature of HA.
8. Encryption is on your risk. There is no CPU or network hit, so it's preferred. Password is 16 ASCII characters.


## Home Assistant Setup

Place "sia" folder in **/custom_components** folder

```yaml
# configuration.yaml

sia:
port: **port**
hubs:
- name: **name**
account: **account**
password: *password*

```

Configuration variables:
- **port** (*Required*): Listeting port
- **hubs** (*Required*): List of hubs
- **name** (*Required*): Used to generate sensor ids.
- **account** (*Required*): Hub account to track. 3-16 ASCII hex characters. Must be same, as in hub properties.
- **password** (*Optional*): Encoding key. 16 ASCII characters. Must be same, as in hub properties.

## Disclaimer
This software is supplied "AS IS" without any warranties and support.

## Installation

1. Click install.
1. The latest version is only available through a config flow.
1. After clicking the add button in the Integration pane, you full in the below fields.

If you have multiple accounts that you want to monitor you can choose to have both communicating with the same port, in that case, use the additional accounts checkbox in the config so setup the second (and more) accounts. You can also choose to have both running on a different port, in that case setup the component twice.

After setup you will see one entity per account for the heartbeat, and 3 entities for each zone per account, alarm, smoke sensor and moisture sensor. This means at least four entities are added, each will also have a device associated with it, so allow you to use the area feature. Unwanted sensors should be hidden in the interface.

## Configuration options

Key | Type | Required | Description
-- | -- | -- | --
`port` | `int` | `True` | Port that SIA will listen on.
`account` | `string` | `True` | Hub account to track. 3-16 ASCII hex characters. Must be same, as in hub properties.
`encryption_key` | `string` | `False` | Encoding key. 16 ASCII characters. Must be same, as in hub properties.
`ping_interval` | `int` | `True` | Ping interval in minutes that the alarm system uses to send "Automatic communication test report" messages, the HA component adds 30 seconds before marking a device unavailable. Must be between 1 and 1440 minutes, default is 1.
`zones` | `int` | `True` | The number of zones present for the account, default is 1.
`additional_account` | `bool` | `True` | Used to ask for additional accounts in multiple steps during setup, default is False.

ASCII characters are 0-9 and ABCDEF, so a account is something like `346EB` and the encryption key is the same but 16 characters.
***

[sia]: https://github.com/eavanvalkenburg/sia-ha
[ch_sia]: https://github.com/Cheaterdev/sia-ha
[hacs]: https://github.com/custom-components/hacs
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
Binary file added SIA Codes.xlsx
Binary file not shown.
Binary file added SIA_code.pdf
Binary file not shown.
Loading