-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SIA Alarm systems #36625
Add SIA Alarm systems #36625
Conversation
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
I've been using this through HACS with great success and would love to see it as an official integration. |
Thanks for the review @OnFreund some good comments, I also need to rebase since it has been a while and have made updates to the HACS version that I have not done here yet, so will work on those this week! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good to me, other than create Entity instances in the hub, but I'll defer to the core team on that
Thanks very much @OnFreund, took some effort but definitely made the code better! |
It seems like the binary sensor platform is back. Didn't you remove it? |
yeah, I thought I'd be a good citizen and do a rebase but something went wrong. Fixing now! |
@bdraco approved and I looked too. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the comments in a new PR. Thanks!
@eavanvalkenburg do you want help solving the new review comments ? I did part of the old review, but did not catch the new comments. |
Yeah, I plan to work on this tomorrow |
super that is the best way. |
* initial commit of SIA integration * translations * moved reactions to file, typed everything * fixed no-else-return 3 times * refactored config and fix coverage of test * fix requirements_test * elimated another platform * forgot some mentions of sensor * updated config flow steps, fixed restore and small edits * fixed pylint * updated config_flow with better schema, small fixes from review * final comment and small legibility enhancements * small fix for pylint * fixed init * fixes for botched rebase * fixed port string * updated common strings * rebuild component with eventbus * fixed pylint and tests * updates based on review by @bdraco * updates based on new version of package and reviews * small updates with latest package * added raise from * deleted async_setup from test * fixed tests * removed unused code from addititional account step * fixed typo in strings * clarification and update to update_data func * added iot_class to manifest * fixed entity and unique id setup * small fix in tests * improved unique_id semantics and load/unload functions * added typing in order to fix mypy * further fixes for typing * final fixes for mypy * adding None return types * fix hub DR identifier * rebased, added DeviceInfo * rewrite to clean up and make it easier to read * replaced functions with format for id and name * renamed tracker remover small fix in state.setter * improved readibility of state.setter * no more state.setter and small updates * mypy fix * fixed and improved config flow * added fixtures to test and other cleaner test code * removed timeband from config, will reintro in a options flow * removed timeband from tests * added options flow for zones and timestamps * removed type ignore * replaced mapping with collections.abc
Proposed change
This PR introduces a integration for SIA DC-09 based alarm systems. The SIA protocol is a listen only protocol created by the Security Industry Association (SIA) to allow monitoring companies to listen to alarm systems, with HA that can be done locally on the network and allows you to use the HA ecosystem to act on events from your alarm. It was tested using a alarm system created by Ajax, the SIA specific logic is created in a pypi package, while this component listens to specific types of events and updates entities based on those.
For clarity, the SIA Protocol listens (creates a server) on a port, on each port there can be multiple alarm systems, which are called accounts, each account can have 1 or more zones. This first PR just creates a alarm_control_panel entity per account and zone (so if you setup with 1 account and 1 zone, then you get 1 entity, if you create one with 3 accounts and 2 zones each, you would end up with 6 alarm_control_panel entities. Once this is approved support for Moisture and Smoke binary_sensors will be added. This integration is already running for a number of people through HACS and therefore the additional sensors are expected soon, because of this there are some small things in the code that seem strange, such as having a list of platforms with one value. A user can create multiple instances listening on different ports, that is checked during the config flow.
Type of change
Example entry for
configuration.yaml
:Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: