diff options
Diffstat (limited to 'python-adext.spec')
-rw-r--r-- | python-adext.spec | 285 |
1 files changed, 285 insertions, 0 deletions
diff --git a/python-adext.spec b/python-adext.spec new file mode 100644 index 0000000..12a2307 --- /dev/null +++ b/python-adext.spec @@ -0,0 +1,285 @@ +%global _empty_manifest_terminate_build 0 +Name: python-adext +Version: 0.4.2 +Release: 1 +Summary: AlarmDecoder extended +License: MIT +URL: https://github.com/ajschmidt8/adext +Source0: https://files.pythonhosted.org/packages/d2/95/dffa1a23232b725418a7579cb988d5245e588d677b3389bef3868d8dfbc8/adext-0.4.2.tar.gz +BuildArch: noarch + +Requires: python3-alarmdecoder + +%description +# adext + +`adext` is a small package that extends [alarmdecoder](https://github.com/nutechsoftware/alarmdecoder/) to include some additional methods for [Home Assistant](https://github.com/home-assistant/core). + +Specifically, the following methods have been added: + +- `arm_home` +- `arm_away` +- `arm_night` + +Each method accepts the arguments described below to determine which key sequences are used to arm a panel based on factors like panel brand and user config settings. + +## Arguments: + +- **code**: (`None` or `str`) - the code used to arm a panel (i.e. `'1234'`) +- **auto_bypass**: (`bool`) - for Honeywell only. set to `True` to prefix an arming sequence with `<code> + 6#` in order to automatically bypass any faulted zones. This will require a code to be entered even if `code_arm_required` is set to `false`." +- **code_arm_required**: (`bool`) - set to `False` to enable arming without a code. see [Arming Key Sequences](#Arming-Key-Sequences) below. +- **alt_night_mode**: (`bool`) - For Honeywell systems, set to `true` to enable *Night-Stay* mode instead of *Instant* mode for night arming. For DSC systems, set to `true` to enable *No-Entry* mode instead of *Stay* mode for night arming. For both systems, whenever this option is set to `true`, a code will be required for night arming **regardless of the `code_arm_required` setting.** See [Arming Key Sequences](#Arming-Key-Sequences) section below for more information. + + +## Arming Key Sequences + +The tables below show the key press sequences used for arming for the different panel brands and configuration setting combinations. + +### Honeywell + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` + `3` | +| `alarm_arm_away` | `code` + `2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` + `7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +#### code_arm_required = false + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `#3` | +| `alarm_arm_away` | `#2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `#7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +### DSC + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` | +| `alarm_arm_away` | `code` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + +#### code_arm_required = false + +<div class='note'> + +The `chr(4)` and `chr(5)` sequences below are equivalent to pressing the <em>Stay</em> and <em>Away</em> keypad keys respectively (as outlined in the <a href='http://www.alarmdecoder.com/wiki/index.php/Protocol#Special_Keys'>AlarmDecoder documentation</a>). + +</div> + +| Mode | Key Sequence | +| ------------------------------------------------------- | ------------------------------- | +| `alarm_arm_home` | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_away` | `chr(5)` + `chr(5)` + `chr(5)` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + + + + +%package -n python3-adext +Summary: AlarmDecoder extended +Provides: python-adext +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%description -n python3-adext +# adext + +`adext` is a small package that extends [alarmdecoder](https://github.com/nutechsoftware/alarmdecoder/) to include some additional methods for [Home Assistant](https://github.com/home-assistant/core). + +Specifically, the following methods have been added: + +- `arm_home` +- `arm_away` +- `arm_night` + +Each method accepts the arguments described below to determine which key sequences are used to arm a panel based on factors like panel brand and user config settings. + +## Arguments: + +- **code**: (`None` or `str`) - the code used to arm a panel (i.e. `'1234'`) +- **auto_bypass**: (`bool`) - for Honeywell only. set to `True` to prefix an arming sequence with `<code> + 6#` in order to automatically bypass any faulted zones. This will require a code to be entered even if `code_arm_required` is set to `false`." +- **code_arm_required**: (`bool`) - set to `False` to enable arming without a code. see [Arming Key Sequences](#Arming-Key-Sequences) below. +- **alt_night_mode**: (`bool`) - For Honeywell systems, set to `true` to enable *Night-Stay* mode instead of *Instant* mode for night arming. For DSC systems, set to `true` to enable *No-Entry* mode instead of *Stay* mode for night arming. For both systems, whenever this option is set to `true`, a code will be required for night arming **regardless of the `code_arm_required` setting.** See [Arming Key Sequences](#Arming-Key-Sequences) section below for more information. + + +## Arming Key Sequences + +The tables below show the key press sequences used for arming for the different panel brands and configuration setting combinations. + +### Honeywell + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` + `3` | +| `alarm_arm_away` | `code` + `2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` + `7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +#### code_arm_required = false + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `#3` | +| `alarm_arm_away` | `#2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `#7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +### DSC + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` | +| `alarm_arm_away` | `code` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + +#### code_arm_required = false + +<div class='note'> + +The `chr(4)` and `chr(5)` sequences below are equivalent to pressing the <em>Stay</em> and <em>Away</em> keypad keys respectively (as outlined in the <a href='http://www.alarmdecoder.com/wiki/index.php/Protocol#Special_Keys'>AlarmDecoder documentation</a>). + +</div> + +| Mode | Key Sequence | +| ------------------------------------------------------- | ------------------------------- | +| `alarm_arm_home` | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_away` | `chr(5)` + `chr(5)` + `chr(5)` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + + + + +%package help +Summary: Development documents and examples for adext +Provides: python3-adext-doc +%description help +# adext + +`adext` is a small package that extends [alarmdecoder](https://github.com/nutechsoftware/alarmdecoder/) to include some additional methods for [Home Assistant](https://github.com/home-assistant/core). + +Specifically, the following methods have been added: + +- `arm_home` +- `arm_away` +- `arm_night` + +Each method accepts the arguments described below to determine which key sequences are used to arm a panel based on factors like panel brand and user config settings. + +## Arguments: + +- **code**: (`None` or `str`) - the code used to arm a panel (i.e. `'1234'`) +- **auto_bypass**: (`bool`) - for Honeywell only. set to `True` to prefix an arming sequence with `<code> + 6#` in order to automatically bypass any faulted zones. This will require a code to be entered even if `code_arm_required` is set to `false`." +- **code_arm_required**: (`bool`) - set to `False` to enable arming without a code. see [Arming Key Sequences](#Arming-Key-Sequences) below. +- **alt_night_mode**: (`bool`) - For Honeywell systems, set to `true` to enable *Night-Stay* mode instead of *Instant* mode for night arming. For DSC systems, set to `true` to enable *No-Entry* mode instead of *Stay* mode for night arming. For both systems, whenever this option is set to `true`, a code will be required for night arming **regardless of the `code_arm_required` setting.** See [Arming Key Sequences](#Arming-Key-Sequences) section below for more information. + + +## Arming Key Sequences + +The tables below show the key press sequences used for arming for the different panel brands and configuration setting combinations. + +### Honeywell + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` + `3` | +| `alarm_arm_away` | `code` + `2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` + `7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +#### code_arm_required = false + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `#3` | +| `alarm_arm_away` | `#2` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `#7` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `code` + `33` | + +### DSC + +#### code_arm_required = true (default) + +| Mode | Key Sequence | +| ------------------------------------------------------- | --------------------------- | +| `alarm_arm_home` | `code` | +| `alarm_arm_away` | `code` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `code` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + +#### code_arm_required = false + +<div class='note'> + +The `chr(4)` and `chr(5)` sequences below are equivalent to pressing the <em>Stay</em> and <em>Away</em> keypad keys respectively (as outlined in the <a href='http://www.alarmdecoder.com/wiki/index.php/Protocol#Special_Keys'>AlarmDecoder documentation</a>). + +</div> + +| Mode | Key Sequence | +| ------------------------------------------------------- | ------------------------------- | +| `alarm_arm_home` | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_away` | `chr(5)` + `chr(5)` + `chr(5)` | +| `alarm_arm_night` (`alt_night_mode` = `false`, default) | `chr(4)` + `chr(4)` + `chr(4)` | +| `alarm_arm_night` (`alt_night_mode` = `true`) | `*9` + `code` | + + + + +%prep +%autosetup -n adext-0.4.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-adext -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Feb 23 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.2-1 +- Package Spec generated |