├── .devcontainer
├── Dockerfile
├── devcontainer.json
└── start_ha.sh
├── .gitattributes
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ └── bug_report.md
├── dependabot.yml
└── workflows
│ └── texecom2mqtt-publish.yml
├── .vscode
└── tasks.json
├── CHANGELOG.md
├── DEVELOPMENT.md
├── LICENSE
├── README.md
├── config.json
├── repository.json
└── update.py
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:20.04
2 |
3 | WORKDIR /workspaces
4 |
5 | # Default ENV
6 | ENV LANG C.UTF-8
7 | ENV DEBIAN_FRONTEND noninteractive
8 |
9 | # Set shell
10 | SHELL ["/bin/bash", "-o", "pipefail", "-c"]
11 |
12 | # Use the mirror protocol for a fast mirror
13 | RUN sed -i -e 's/http:\/\/archive\.ubuntu\.com\/ubuntu\//mirror:\/\/mirrors\.ubuntu\.com\/mirrors\.txt/' /etc/apt/sources.list
14 |
15 | # Install docker, jq, socat
16 | # https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
17 | RUN apt-get update && apt-get install -y --no-install-recommends \
18 | apt-transport-https \
19 | ca-certificates \
20 | curl \
21 | dbus \
22 | software-properties-common \
23 | gpg-agent \
24 | git \
25 | jq \
26 | socat \
27 | sudo \
28 | && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
29 | && add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
30 | && apt-get update && apt-get install -y --no-install-recommends \
31 | docker-ce \
32 | docker-ce-cli \
33 | containerd.io
34 | # This is a development container. Don't bother to clean up apt cache, this way we have it handy later
35 |
36 | COPY .devcontainer/start_ha.sh /usr/local/bin/start_ha.sh
37 |
38 | # Install dependencies for the add-on development below. For example, if you're running Node.js,
39 | # you may want something like the following...
40 | # RUN apt-get install -y --no-install-recommends nodejs npm
41 |
42 | # Generate a machine-id for this container
43 | RUN rm /etc/machine-id && dbus-uuidgen --ensure=/etc/machine-id
44 |
45 | ENV DEBIAN_FRONTEND=dialog
46 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Example devcontainer for add-on repositories",
3 | "image": "ghcr.io/home-assistant/devcontainer:2-addons",
4 | "appPort": ["7123:8123", "7357:4357"],
5 | "postStartCommand": "bash devcontainer_bootstrap",
6 | "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"],
7 | "containerEnv": {
8 | "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
9 | },
10 | "customizations": {
11 | "vscode": {
12 | "extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"],
13 | "settings": {
14 | "terminal.integrated.profiles.linux": {
15 | "zsh": {
16 | "path": "/usr/bin/zsh"
17 | }
18 | },
19 | "terminal.integrated.defaultProfile.linux": "zsh",
20 | "editor.formatOnPaste": false,
21 | "editor.formatOnSave": true,
22 | "editor.formatOnType": true,
23 | "files.trimTrailingWhitespace": true
24 | }
25 | }
26 | },
27 | "mounts": [
28 | "type=volume,target=/var/lib/docker",
29 | "type=volume,target=/mnt/supervisor"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/.devcontainer/start_ha.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eE
3 |
4 | DOCKER_TIMEOUT=30
5 | DOCKER_PID=0
6 |
7 |
8 | function start_docker() {
9 | local starttime
10 | local endtime
11 |
12 | echo "Starting docker..."
13 | dockerd 2> /dev/null &
14 | DOCKER_PID=$!
15 |
16 | echo "Waiting for docker to initialize..."
17 | starttime="$(date +%s)"
18 | endtime="$(date +%s)"
19 | until docker info >/dev/null 2>&1; do
20 | if [ $((endtime - starttime)) -le $DOCKER_TIMEOUT ]; then
21 | sleep 1
22 | endtime=$(date +%s)
23 | else
24 | echo "Timeout while waiting for docker to come up"
25 | exit 1
26 | fi
27 | done
28 | echo "Docker was initialized"
29 | }
30 |
31 |
32 | function stop_docker() {
33 | local starttime
34 | local endtime
35 |
36 | echo "Stopping in container docker..."
37 | if [ "$DOCKER_PID" -gt 0 ] && kill -0 "$DOCKER_PID" 2> /dev/null; then
38 | starttime="$(date +%s)"
39 | endtime="$(date +%s)"
40 |
41 | # Now wait for it to die
42 | kill "$DOCKER_PID"
43 | while kill -0 "$DOCKER_PID" 2> /dev/null; do
44 | if [ $((endtime - starttime)) -le $DOCKER_TIMEOUT ]; then
45 | sleep 1
46 | endtime=$(date +%s)
47 | else
48 | echo "Timeout while waiting for container docker to die"
49 | exit 1
50 | fi
51 | done
52 | else
53 | echo "Your host might have been left with unreleased resources"
54 | fi
55 | }
56 |
57 |
58 | function install() {
59 | docker pull homeassistant/amd64-hassio-supervisor:dev
60 | docker pull homeassistant/amd64-hassio-cli:dev
61 | }
62 |
63 | function cleanup_hass_data() {
64 | rm -rf /workspaces/test_hassio/{apparmor,backup,config.json,dns,dns.json,homeassistant,homeassistant.json,ingress.json,share,ssl,tmp,updater.json}
65 | rm -rf /workspaces/test_hassio/addons/{core,data,git}
66 | }
67 |
68 | function cleanup_docker() {
69 | echo "Cleaning up stopped containers..."
70 | docker rm $(docker ps -a -q)
71 | }
72 |
73 | function run_supervisor() {
74 | docker run --rm --privileged \
75 | --name hassio_supervisor \
76 | --security-opt seccomp=unconfined \
77 | --security-opt apparmor:unconfined \
78 | -v /run/docker.sock:/run/docker.sock \
79 | -v /run/dbus:/run/dbus \
80 | -v "/workspaces/test_hassio":/data \
81 | -v /etc/machine-id:/etc/machine-id:ro \
82 | -e SUPERVISOR_SHARE="/workspaces/test_hassio" \
83 | -e SUPERVISOR_NAME=hassio_supervisor \
84 | -e SUPERVISOR_DEV=1 \
85 | -e HOMEASSISTANT_REPOSITORY="homeassistant/qemux86-64-homeassistant" \
86 | homeassistant/amd64-hassio-supervisor:dev
87 | }
88 |
89 | case "$1" in
90 | "--cleanup")
91 | echo "Cleaning up old environment"
92 | cleanup_docker || true
93 | cleanup_hass_data || true
94 | exit 0;;
95 | *)
96 | echo "Creating development Home Assistant environment"
97 | start_docker
98 | trap "stop_docker" ERR
99 | install
100 | cleanup_docker || true
101 | run_supervisor
102 | stop_docker;;
103 | esac
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sh text eol=lf
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | custom: https://www.buymeacoffee.com/dchesterton
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help improve the app
4 | title: ''
5 | labels: ''
6 | assignees: dchesterton
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **Application version**
14 | Which version of the app are you running? You should be able to get this from the first line of the log.
15 |
16 | **Texecom alarm type**
17 | e.g. Premier Elite 48
18 |
19 | **Home Assistant version**
20 | The version of Home Assistant, if applicable.
21 |
22 | **Debug log**
23 | Include the app log output to help diagnose the issue. If possible, please add `log: debug` to your config to get the debug log with more information.
24 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 | commit-message:
8 | prefix: "[ci skip]"
9 |
--------------------------------------------------------------------------------
/.github/workflows/texecom2mqtt-publish.yml:
--------------------------------------------------------------------------------
1 | name: Update Version
2 | on:
3 | repository_dispatch:
4 | types: [texecom2mqtt-publish]
5 | jobs:
6 | update_version:
7 | name: Update Version
8 | runs-on: ubuntu-20.04
9 | steps:
10 | - name: Checkout code
11 | uses: actions/checkout@v2
12 | with:
13 | ref: master
14 | - name: Bump config.json version
15 | run: python update.py ${{ github.event.client_payload.version }}
16 | - name: Update README.md
17 | run: echo "${{ github.event.client_payload.readme }}" | openssl base64 -d -A > README.md
18 | - name: Update CHANGELOG.md
19 | run: echo "${{ github.event.client_payload.full_changelog }}" | openssl base64 -d -A > CHANGELOG.md
20 | - name: Commit updates
21 | uses: EndBug/add-and-commit@v7
22 | with:
23 | branch: master
24 | message: "ci: bump version to ${{ github.event.client_payload.version }}"
25 | - name: Decode changelog
26 | run: |
27 | changelog="$(echo "$CHANGELOG" | openssl base64 -d -A)"
28 | changelog="${changelog//'%'/'%25'}"
29 | changelog="${changelog//$'\n'/'%0A'}"
30 | changelog="${changelog//$'\r'/'%0D'}"
31 | echo "::set-output name=changelog::$changelog"
32 | id: changelog
33 | env:
34 | CHANGELOG: ${{ github.event.client_payload.changelog }}
35 | - name: Create release
36 | uses: actions/create-release@v1
37 | env:
38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 | with:
40 | tag_name: v${{ github.event.client_payload.version }}
41 | release_name: Release v${{ github.event.client_payload.version }}
42 | body: "${{ steps.changelog.outputs.changelog }}"
43 | commitish: master
44 | draft: false
45 | prerelease: false
46 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "Start Home Assistant",
6 | "type": "shell",
7 | "command": "supervisor_run",
8 | "group": {
9 | "kind": "test",
10 | "isDefault": true
11 | },
12 | "presentation": {
13 | "reveal": "always",
14 | "panel": "new"
15 | },
16 | "problemMatcher": []
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [1.3.1](https://github.com/dchesterton/texecom2mqtt/compare/v1.3.0...v1.3.1) (2025-02-25)
2 |
3 |
4 | ### Bug Fixes
5 |
6 | * fix bug when handling unknown area status ([9dd080f](https://github.com/dchesterton/texecom2mqtt/commit/9dd080f9356a8ef59194cedf80f3baccd186b9e0))
7 | * fix call to setEventMessages when logged out ([5f56dbc](https://github.com/dchesterton/texecom2mqtt/commit/5f56dbca2c76d3b4fa0c001af907f7f83c2ca6d6))
8 |
9 |
10 |
11 | # [1.3.0](https://github.com/dchesterton/texecom2mqtt/compare/v1.2.3...v1.3.0) (2025-02-25)
12 |
13 |
14 | ### Bug Fixes
15 |
16 | * add retain parameter to debug log when publishing MQTT message ([bce9bc6](https://github.com/dchesterton/texecom2mqtt/commit/bce9bc654b29a2ccf135d2c66705b86633ae7aeb))
17 | * fix bug where armed status would be undefined ([a237917](https://github.com/dchesterton/texecom2mqtt/commit/a237917724a896095c48cfa7e440d9508d6f0dbc))
18 | * fix bug where changing texecom2mqtt config would not be reflected if cache: true was set ([af0cab8](https://github.com/dchesterton/texecom2mqtt/commit/af0cab8de1bc29a0faf54068597b9dc17a4f846d))
19 | * improve disconnection to panel ([05b73c2](https://github.com/dchesterton/texecom2mqtt/commit/05b73c22ae546215fb84829db06a107ee42d256a))
20 | * improve trace logging ([dbbe5e8](https://github.com/dchesterton/texecom2mqtt/commit/dbbe5e87b1198a72bd55877c5fb5b3c26aea7013))
21 | * reconnect to panel on error instead of exiting ([dfcda7d](https://github.com/dchesterton/texecom2mqtt/commit/dfcda7d842bf6f910efc191eb3fa299a61fc385c))
22 | * reduce likelihood of corrupt response error ([1797dd4](https://github.com/dchesterton/texecom2mqtt/commit/1797dd4af00be8f9d62198b02174219061e82301))
23 | * reduce number of commands sent to/from panel ([8c5fddd](https://github.com/dchesterton/texecom2mqtt/commit/8c5fddda5ca9d625faea5ca7cc9b8a1c4d448aae))
24 | * update area state after panic alarm ([3a87e4d](https://github.com/dchesterton/texecom2mqtt/commit/3a87e4de20f8a43174785a21315f0e3a7f6196db))
25 | * use local timezone in application logs ([e36a61d](https://github.com/dchesterton/texecom2mqtt/commit/e36a61dcc2614046c4b208b9a2aee81e2910d89a))
26 |
27 |
28 | ### Features
29 |
30 | * fetch MQTT settings automatically when used as a Home Assistant add-on ([cbb275f](https://github.com/dchesterton/texecom2mqtt/commit/cbb275ff04fb3c81b40016f406b94c051440fbba))
31 | * send zone name in log event on RF device low battery ([9dd69e7](https://github.com/dchesterton/texecom2mqtt/commit/9dd69e7bfe81e46601ddd234dc86fd15a8307377))
32 |
33 |
34 |
35 | ## [1.2.3](https://github.com/dchesterton/texecom2mqtt/compare/v1.2.2...v1.2.3) (2022-01-12)
36 |
37 |
38 | ### Bug Fixes
39 |
40 | * fix issue where app doesn't quit if serial number fetch fails ([4623618](https://github.com/dchesterton/texecom2mqtt/commit/46236185a6852f753736efa294410c49866325c2))
41 |
42 |
43 |
44 | ## [1.2.2](https://github.com/dchesterton/texecom2mqtt/compare/v1.2.1...v1.2.2) (2022-01-12)
45 |
46 |
47 | ### Bug Fixes
48 |
49 | * improve error messages when receiving corrupt messages from panel ([6081db0](https://github.com/dchesterton/texecom2mqtt/commit/6081db074460a986e2f4466e276f1c1a5833f071))
50 |
51 |
52 |
53 | ## [1.2.1](https://github.com/dchesterton/texecom2mqtt/compare/v1.2.0...v1.2.1) (2022-01-12)
54 |
55 |
56 | ### Bug Fixes
57 |
58 | * fix bug where groupType would not be included in texecom2mqtt/log MQTT message if 0 ([f3b050b](https://github.com/dchesterton/texecom2mqtt/commit/f3b050b05522711e8a023c540c4147b710b4d682))
59 |
60 |
61 |
62 | # [1.2.0](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.15...v1.2.0) (2022-01-11)
63 |
64 |
65 | ### Bug Fixes
66 |
67 | * fix issue where keepalive fails causing the app to hang ([3ade60a](https://github.com/dchesterton/texecom2mqtt/commit/3ade60a5aa996e522fbfe6dc1c3a65750c4a716e))
68 |
69 |
70 | ### Features
71 |
72 | * add groupType to texecom2mqtt/log messages ([079ed00](https://github.com/dchesterton/texecom2mqtt/commit/079ed00baf42d7f632365c9caec2b13bed32224b))
73 |
74 |
75 |
76 | ## [1.1.15](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.14...v1.1.15) (2022-01-08)
77 |
78 |
79 |
80 | ## [1.1.14](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.13...v1.1.14) (2022-01-02)
81 |
82 |
83 |
84 | ## [1.1.13](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.12...v1.1.13) (2021-12-31)
85 |
86 |
87 |
88 | ## [1.1.12](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.11...v1.1.12) (2021-12-30)
89 |
90 |
91 |
92 | ## [1.1.11](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.10...v1.1.11) (2021-12-30)
93 |
94 |
95 |
96 | ## [1.1.10](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.9...v1.1.10) (2021-12-24)
97 |
98 |
99 |
100 | ## [1.1.9](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.8...v1.1.9) (2021-12-18)
101 |
102 |
103 |
104 | ## [1.1.8](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.6...v1.1.8) (2021-12-11)
105 |
106 |
107 |
108 | ## [1.1.6](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.5...v1.1.6) (2021-09-22)
109 |
110 |
111 |
112 | ## [1.1.5](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.4...v1.1.5) (2021-08-24)
113 |
114 |
115 |
116 | ## [1.1.4](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.2...v1.1.4) (2021-08-23)
117 |
118 |
119 |
120 | ## [1.1.2](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.1...v1.1.2) (2021-08-23)
121 |
122 |
123 |
124 | ## [1.1.1](https://github.com/dchesterton/texecom2mqtt/compare/v1.1.0...v1.1.1) (2021-07-21)
125 |
126 |
127 | ### Reverts
128 |
129 | * Revert "Try automatic updating of Docker Hub README" ([41d12dd](https://github.com/dchesterton/texecom2mqtt/commit/41d12dd8ba125db68d2066fb95b8f2beee8dd06b))
130 |
131 |
132 |
133 | # [1.1.0](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.42...v1.1.0) (2021-07-18)
134 |
135 |
136 |
137 | ## [1.0.42](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.41...v1.0.42) (2021-05-17)
138 |
139 |
140 |
141 | ## [1.0.41](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.40...v1.0.41) (2021-05-15)
142 |
143 |
144 | ### Reverts
145 |
146 | * Revert "[ci skip] Small refactor to simplify code" ([d6f9d44](https://github.com/dchesterton/texecom2mqtt/commit/d6f9d4484b6a1cc00e5367adc46e90c2f8eb6fc4))
147 |
148 |
149 |
150 | ## [1.0.40](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.39...v1.0.40) (2021-04-12)
151 |
152 |
153 |
154 | ## [1.0.39](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.38...v1.0.39) (2021-03-14)
155 |
156 |
157 |
158 | ## [1.0.38](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.37...v1.0.38) (2021-03-13)
159 |
160 |
161 |
162 | ## [1.0.37](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.36...v1.0.37) (2021-03-10)
163 |
164 |
165 |
166 | ## [1.0.36](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.35...v1.0.36) (2021-03-08)
167 |
168 |
169 |
170 | ## [1.0.35](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.34...v1.0.35) (2021-02-22)
171 |
172 |
173 |
174 | ## [1.0.34](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.33...v1.0.34) (2021-02-21)
175 |
176 |
177 |
178 | ## [1.0.33](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.32...v1.0.33) (2021-02-18)
179 |
180 |
181 |
182 | ## [1.0.32](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.31...v1.0.32) (2021-02-15)
183 |
184 |
185 |
186 | ## [1.0.31](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.30...v1.0.31) (2021-02-15)
187 |
188 |
189 |
190 | ## [1.0.30](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.29...v1.0.30) (2021-02-14)
191 |
192 |
193 |
194 | ## [1.0.29](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.27...v1.0.29) (2021-02-14)
195 |
196 |
197 |
198 | ## [1.0.27](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.26...v1.0.27) (2021-02-14)
199 |
200 |
201 |
202 | ## [1.0.26](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.25...v1.0.26) (2021-02-13)
203 |
204 |
205 |
206 | ## [1.0.25](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.24...v1.0.25) (2021-02-13)
207 |
208 |
209 |
210 | ## [1.0.24](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.23...v1.0.24) (2021-02-13)
211 |
212 |
213 |
214 | ## [1.0.23](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.22...v1.0.23) (2021-02-13)
215 |
216 |
217 |
218 | ## [1.0.22](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.21...v1.0.22) (2021-02-11)
219 |
220 |
221 |
222 | ## [1.0.21](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.20...v1.0.21) (2021-02-11)
223 |
224 |
225 |
226 | ## [1.0.20](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.18...v1.0.20) (2021-02-11)
227 |
228 |
229 |
230 | ## [1.0.18](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.16...v1.0.18) (2021-02-11)
231 |
232 |
233 |
234 | ## [1.0.16](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.15...v1.0.16) (2021-02-10)
235 |
236 |
237 |
238 | ## [1.0.15](https://github.com/dchesterton/texecom2mqtt/compare/v1.0.14...v1.0.15) (2021-02-10)
239 |
240 |
241 |
242 | ## 1.0.14 (2021-02-10)
243 |
244 |
245 |
246 |
--------------------------------------------------------------------------------
/DEVELOPMENT.md:
--------------------------------------------------------------------------------
1 | # Add-on Development
2 |
3 | Full instructions are on [the Home Assistant developers website](https://developers.home-assistant.io/docs/add-ons/testing).
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Daniel Chesterton
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # texecom2mqtt
2 |
3 | An application to interface with a _Texecom Premier Elite_ alarm panel via MQTT. It provides real-time sensor
4 | updates (irrespective of whether the panel is armed or not) and full arming/disarming/part-arming support. The application
5 | also supports Home Assistant auto-discovery and is available as a Home Assistant Add-on.
6 |
7 | It requires a [Premier Elite panel](https://www.texe.com/uk/products/series/control-panels/premier-elite-series/)
8 | (not Premier) with v4+ firmware and either a ComIP, ComWifi or SmartCom connection. It's not recommended to run this app
9 | on the same physical connection as the official Texecom Connect app. You must use only one of the applications at a time
10 | or use a dedicated physical connection for each if you wish to run both.
11 |
12 | Check out [Cameron Gray's YouTube video](https://www.youtube.com/watch?v=3E5ZjfZAn6Y) for a good overview of setting up this application.
13 |
14 | ## Buy Me A ~~Coffee~~ Beer 🍻
15 |
16 | A few people have kindly requested a way to donate a small amount of money. If you feel so inclined I've set up a "Buy Me A Coffee"
17 | page where you can donate a small sum. Please do not feel obligated to donate in any way - I work on the app because it's
18 | useful to myself and others, not for any financial gain - but any token of appreciation is much appreciated 🙂
19 |
20 |
21 |
22 | ## Running the application
23 |
24 | ### Home Assistant Add-on
25 |
26 | #### Optional: Install an MQTT server
27 |
28 | The application requires a MQTT server to run. This can be provided either as a Home Assistant add-on or a standalone server.
29 |
30 | It's recommended to use the [official Mosquitto MQTT add-on](https://github.com/home-assistant/hassio-addons/tree/master/mosquitto). By default, `texecom2mqtt` will connect to an installed MQTT add-on, such as Mosquitto, without any additional configuration.
31 |
32 | #### Install Add-on
33 |
34 | To set the app up as a Home Assistant Add-on:
35 |
36 | 1. Go to 'Supervisor' in Home Assistant, then 'Add-on store'.
37 | 2. Click on the icon in the top right and add `https://github.com/dchesterton/texecom2mqtt-hassio` as
38 | a new repository. The add-on should now be listed on the 'Add-on store' page.
39 | 3. Click on 'texecom2mqtt' on the 'Add-on store' page and click 'Install'.
40 | 4. Add your configuration in the 'Configuration' tab.
41 | * Required: set the Texecom host and UDL password (if set)
42 | * Optional: add MQTT details (the application will use the installed MQTT add-on if available)
43 | * Optional: add zone/area config (the application will fetch these from the panel but additional configuration may be required)
44 | 5. Click 'Save'.
45 | 6. Go to the 'Info' tab, enable 'Start on boot' and 'Watchdog', then click 'Start'.
46 | 7. The app should now be running. Go to the 'Log' tab to check the output logs.
47 |
48 | ### Docker
49 |
50 | ```bash
51 | docker run -d -v $PWD/config.yml:/app/config.yml --name texecom2mqtt dchesterton/texecom2mqtt:latest
52 | ```
53 |
54 | ### Docker Compose
55 |
56 | ```yaml
57 | version: "3"
58 | services:
59 | texecom2mqtt:
60 | container_name: texecom2mqtt
61 | image: dchesterton/texecom2mqtt:latest
62 | restart: unless-stopped
63 | volumes:
64 | - ./config.yml:/app/config.yml
65 | ```
66 |
67 | ## config.yml
68 |
69 | ```yaml
70 | texecom:
71 | # Required: Texecom panel IP address
72 | host: 192.168.0.1
73 |
74 | # Optional: the UDL password programmed in the panel. Note: this is NOT the code used to arm/disarm the panel (default: 1234)
75 | udl_password: "abcdef"
76 |
77 | # Optional: port used to connect to the panel (default: 10001)
78 | port: 10002
79 |
80 | mqtt:
81 | # Optional: broker URL or IP address
82 | # (default: localhost if using Docker, auto-fetched if using add-on)
83 | host: 192.168.1.5
84 |
85 | # Optional: broker port (default: 1883 or 8883 for TLS connections if using Docker, auto-fetched if using add-on)
86 | port: 1884
87 |
88 | # Optional: broker user (default: none if using Docker, auto-fetched if using add-on)
89 | username: my_user
90 |
91 | # Optional: broker password (default: none if using Docker, auto-fetched if using add-on)
92 | password: my_password
93 |
94 | # Optional: topic prefix to use (default: texecom2mqtt)
95 | prefix: texecom2mqtt
96 |
97 | # Optional: MQTT client ID (default: texecom2mqtt)
98 | client_id: texecom2mqtt
99 |
100 | # Optional: keepalive in seconds (default: 60)
101 | keepalive: 30
102 |
103 | # Optional: clean session (default: true)
104 | clean: true
105 |
106 | # Optional: retain (default: true)
107 | retain: true
108 |
109 | # Optional: retain log messages (default: false)
110 | retain_log: false
111 |
112 | # Optional: MQTT QoS (default: 0)
113 | # Note: there's a bug with Mosquitto when qos > 0 (https://github.com/eclipse-mosquitto/mosquitto/issues/2887#issuecomment-2195094631) so I'd recommend keeping this as 0 unless you have a good reason not to
114 | qos: 0
115 |
116 | # Optional: CA for TLS connection (default: none)
117 | ca: /cert/ca.pem
118 |
119 | # Optional: certificate for TLS connection (default: none)
120 | cert: /cert/cert.pem
121 |
122 | # Optional: private key for TLS connection (default: none)
123 | key: /cert/key.pem
124 |
125 | # Optional: if not false, the server certificate is verified against the list of supplied CAs. Override with caution (default: true when using TLS)
126 | reject_unauthorized: true
127 |
128 | homeassistant:
129 | # Optional: enable Home Assistant discovery (default: false if using Docker, true if using add-on)
130 | discovery: true
131 |
132 | # Optional: Home Assistant MQTT topic prefix (default: homeassistant)
133 | prefix: home-assistant
134 |
135 | # Optional: the application will fetch zone data automatically. You only have to specify zones if you wish to customise the name or device class of a zone
136 | zones:
137 | # Required: zone number (e.g. '4') or a 'slug' of the zone name (e.g. 'front_door' for a zone area named 'Front Door')
138 | - id: front_door
139 |
140 | # Optional: override the zone name (default: zone name in panel)
141 | name: Front Door Sensor
142 |
143 | # Optional: set the Home Assistant device class for a zone (default: the app will guess based on zone name and type). See https://www.home-assistant.io/integrations/binary_sensor/#device-class for available device classes
144 | device_class: motion
145 |
146 | - id: ...
147 | name: ...
148 |
149 | # Optional: the application will fetch zone data automatically. You only have to specify areas if you wish to set arming details
150 | areas:
151 | # Required: area ID (e.g. 'A') or a 'slug' of the area name (e.g. 'detached_garage' for an area named 'Detached Garage')
152 | - id: house
153 |
154 | # Optional: override the area name (default: area name in panel)
155 | name: House Alarm
156 |
157 | # Optional: mappings of Texecom arm types to Home Assistant arm types (armed_away, armed_home, armed_night, armed_custom_bypass, armed_vacation), omit any which are not relevant
158 | full_arm: armed_away
159 | part_arm_1: armed_night
160 | part_arm_2: armed_home
161 | part_arm_3: armed_custom_bypass
162 |
163 | # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code_arm_required
164 | code_arm_required: false
165 |
166 | # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code_disarm_required
167 | code_disarm_required: false
168 |
169 | # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code
170 | code: "123456"
171 |
172 | - id: ...
173 | name: ...
174 |
175 | # Optional: cache panel zones/areas instead of loading them from the panel each time. Highly recommended if using a larger panel and/or your data will not change (default: false)
176 | cache: true
177 |
178 | # Optional: log level, either trace, debug, panel, info, warning or error in ascending order of detail (default: info)
179 | log: debug
180 | ```
181 |
182 | ## FAQ
183 |
184 | ### Can I _trigger_ an alarm with `texecom2mqtt`?
185 |
186 | No. Unfortunately there's no support in the Texecom API to do this. I'd advise installing a Shelly Uni or similar as a panic alarm zone and triggering the alarm panel this way.
187 |
188 | ### Can I perform an action when `X` happens?
189 |
190 | Due to the number of different ways a panel can be configured, the application focuses mainly on zone/area updates and arming/disarming.
191 |
192 | However, all panel log events are sent on the `texecom2mqtt/log` MQTT topic and this can be used for additional automations/actions.
193 |
194 | ## Troubleshooting
195 |
196 | ### I cannot connect to the panel
197 |
198 | - Have you added the correct IP address and port in `config.yml`?
199 | - Check `UDL/Digi Options` -> `Setup Modules` -> `Setup IP Data` on the panel
200 | - Have you set up your ComIP/SmartCom?
201 | - Go to `UDL/Digi Options` -> `Com Port Setup` and set either Com Port 1, Com Port 2 or Com Port 3 to `ComIP Module`
202 | - Have you added the correct UDL password to `config.yml`?
203 | - Check `UDL/Digi Options` -> `UDL Options` -> `UDL Password`
204 | - Have you disabled encryption?
205 | - Check `UDL/Digi Options` -> `Setup Modules` -> `Encrypted Ports`
206 | - Have you stopped the Texecom Connect app?
207 | - Each physical connection (SmartCom or ComIP) only supports one concurrent application
208 |
209 | ### My zones/areas are out-of-date
210 |
211 | Disable the cache by setting `cache: false` in your `config.yml` file. Restart the app. Re-enable your cache by setting `cache: true` and restart the app again.
212 |
213 | ### The official Texecom app is not working with texecom2mqtt
214 |
215 | Each physical connection (SmartCom or ComIP) only supports one concurrent application. I recommend running _either_ `texecom2mqtt` or the Texecom app, or install both a SmartCom and ComIP and use one for each application.
216 |
217 | ### Missing sensors
218 |
219 | There's [a bug](https://github.com/eclipse-mosquitto/mosquitto/issues/2887#issuecomment-2195094631) when the MQTT QoS is set to `2` with some versions of Mosquitto. Try changing the QoS parameter to `0`.
220 |
221 | ### Entities are not showing in Home Assistant
222 |
223 | - Have you enabled 'discovery' in your MQTT config in Home Assistant? (Configuration - MQTT)
224 | - If you've changed the default prefix, have you set the correct prefix in `config.yml`?
225 |
226 | ### The Alarm Panel Card is not showing the correct states for my alarm in the frontend
227 |
228 | Unfortunately, this card only shows Arm Away and Arm Home by default. You'll need to edit the card and select the additional states from the "available states" dropdown.
229 |
230 | ## Topics
231 |
232 | The application publishes to the following topics:
233 |
234 | ### texecom2mqtt/zone/[name]
235 |
236 | An object representing the current state of a zone, e.g.
237 |
238 | ```json
239 | {
240 | "name": "Front Door",
241 | "number": 5,
242 | "status": 1,
243 | "type": "Entry/Exit 1",
244 | "areas": ["A", "B", "C"]
245 | }
246 | ```
247 |
248 | ### texecom2mqtt/area/[name]
249 |
250 | An object representing the current state of an area, e.g.
251 |
252 | ```json
253 | {
254 | "id": "A",
255 | "name": "House Alarm",
256 | "number": 1,
257 | "status": "disarmed",
258 | "last_active_zone": {
259 | "name": "Front Door",
260 | "number": 1
261 | }
262 | }
263 | ```
264 |
265 | The `status` parameter will be one of:
266 |
267 | - `disarmed`
268 | - `full_armed`
269 | - `part_armed_1`
270 | - `part_armed_2`
271 | - `part_armed_3`
272 | - `triggered`
273 | - `in_entry`
274 | - `in_exit`
275 |
276 | The `last_active_zone` parameter is only available when the status is `triggered`.
277 |
278 | ### texecom2mqtt/area/[name]/command
279 |
280 | Set the area status. Payload must be one of:
281 |
282 | - `full_arm`
283 | - `part_arm_1`
284 | - `part_arm_2`
285 | - `part_arm_3`
286 | - `disarm`
287 |
288 | ### texecom2mqtt/text
289 |
290 | Set the LCD text on all connected keypads. The payload is the string to display. Note: a maximum
291 | of 32 characters can be displayed.
292 |
293 | ### texecom2mqtt/datetime
294 |
295 | Set the system date. The payload should be a ISO 8601 formatted string which
296 | can be parsed by [Luxon](https://moment.github.io/luxon/docs/manual/parsing.html).
297 |
298 | ### texecom2mqtt/status
299 |
300 | Either `online` or `offline` depending on whether the application is running.
301 |
302 | ### texecom2mqtt/power
303 |
304 | An object representing the current power consumption, e.g.
305 |
306 | ```json
307 | {
308 | "battery_charging_current": 36,
309 | "battery_voltage": 13.42,
310 | "panel_current": 423,
311 | "panel_voltage": 13.49
312 | }
313 | ```
314 |
315 | `battery_charging_current` and `panel_current` are given in milliamps.
316 |
317 | ### texecom2mqtt/log
318 |
319 | An object representing a panel log event, e.g.
320 |
321 | ```json
322 | {
323 | "type": "ArmFailed",
324 | "description": "Arm Failed",
325 | "timestamp": "2020-01-01T00:00:00+00:00",
326 | "areas": ["A"],
327 | "parameter": 8,
328 | "entity": {
329 | "zone_id": "front_door",
330 | "zone_name": "Front Door"
331 | }
332 | }
333 | ```
334 |
335 | ```json
336 | {
337 | "type": "UserCode",
338 | "description": "User Code",
339 | "timestamp": "2020-01-01T00:00:00+00:00",
340 | "areas": ["A", "B"],
341 | "parameter": 1,
342 | "entity": {
343 | "user_id": 1
344 | }
345 | }
346 | ```
347 |
348 | ```json
349 | {
350 | "type": "TimeChanged",
351 | "description": "Time Changed",
352 | "timestamp": "2020-01-01T00:00:00+00:00",
353 | "areas": [],
354 | "parameter": 0
355 | }
356 | ```
357 |
358 | `parameter` will be either a zone number, user number, expander number or keypad number
359 | depending on the log event type.
360 |
361 | `entity` will be a user object as per the example above for 'UserCode' events and a zone
362 | object as per the example above for 'ArmFailed'
363 |
364 | | Log Event Types | | | |
365 | | ------------------------- | ------------------------- | ----------------------- | ------------------------ |
366 | | EntryExit1 | EntryExit2 | Guard | GuardAccess |
367 | | TwentyFourHourAudible | TwentyFourHourSilent | PAAudible | PASilent |
368 | | Fire | Medical | TwentyFourHourGas | Auxiliary |
369 | | Tamper | ExitTerminator | MomentKey | LatchKey |
370 | | Security | OmitKey | Custom | ConfirmedPAAudible |
371 | | ConfirmedPASilent | KeypadMedical | KeypadFire | KeypadAudiblePA |
372 | | KeypadSilentPA | DuressCodeAlarm | AlarmActive | BellActive |
373 | | Rearm | VerifiedCrossZoneAlarm | UserCode | ExitStarted |
374 | | ExitError | EntryStarted | PartArmSuite | ArmedWithLineFault |
375 | | OpenClose | PartArmed | AutoOpenClose | AutoArmDeferred |
376 | | OpenAfterAlarm | RemoteOpenClose | QuickArm | RecentClosing |
377 | | ResetAfterAlarm | PowerOPFault | ACFail | LowBattery |
378 | | SystemPowerUp | MainsOverVoltage | TelephoneLineFault | FailToCommunicate |
379 | | DownloadStart | DownloadEnd | LogCapacityAlert | DateChanged |
380 | | TimeChanged | InstallerProgrammingStart | InstallerProgrammingEnd | PanelBoxTamper |
381 | | BellTamper | AuxiliaryTamper | ExpanderTamper | KeypadTamper |
382 | | ExpanderTrouble | RemoteKeypadTrouble | FireZoneTamper | ZoneTamper |
383 | | KeypadLockout | CodeTamperAlarm | SoakTestAlarm | ManualTestTransmission |
384 | | AutomaticTestTransmission | UserWalkTestStartEnd | NVMDefaultsLoaded | FirstKnock |
385 | | DoorAccess | PartArm1 | PartArm2 | PartArm3 |
386 | | AutoArmingStarted | ConfirmedAlarm | ProxTag | AccessCodeChangedDeleted |
387 | | ArmFailed | LogCleared | iDLoopShorted | CommunicationPort |
388 | | TAGSystemExitBatteryOK | TAGSystemExitBatteryLow | TAGSystemEntryBatteryOK | TAGSystemEntryBatteryLow |
389 | | MicrophoneActivated | AVClearedDown | MonitoredAlarm | ExpanderLowVoltage |
390 | | SupervisionFault | PAFromRemoteFOB | RFDeviceLowBattery | SiteDataChanged |
391 | | RadioJamming | TestCallPassed | TestCallFailed | ZoneFault |
392 | | ZoneMasked | FaultsOverridden | PSUACFail | PSUBatteryFail |
393 | | PSULowOutputFail | PSUTamper | DoorAccess2 | CIEReset |
394 | | RemoteCommand | UserAdded | UserDeleted | ConfirmedPA |
395 | | UserAcknowledged | PowerUnitFailure | BatteryChargerFault | ConfirmedIntruder |
396 | | GSMTamper | RadioConfigFailure | QuickPartArm1 | QuickPartArm2 |
397 | | QuickPartArm3 | RemotePartArm1 | RemotePartArm2 | RemotePartArm3 |
398 |
399 | ### texecom2mqtt/config
400 |
401 | An object representing the texecom2mqtt config, e.g.
402 |
403 | ```json
404 | {
405 | "version": "1.0.41",
406 | "log_level": "debug",
407 | "model": "Premier Elite 48",
408 | "firmware_version": "V5.02.01LS1",
409 | "serial_number": "12345"
410 | }
411 | ```
412 |
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "texecom2mqtt",
3 | "version": "1.3.1",
4 | "slug": "texecom2mqtt",
5 | "description": "Add-on to interface with Texecom Premier Elite alarm panels using MQTT",
6 | "url": "https://github.com/dchesterton/texecom2mqtt-hassio",
7 | "startup": "application",
8 | "image": "dchesterton/texecom2mqtt",
9 | "hassio_api": true,
10 | "boot": "auto",
11 | "services": ["mqtt:want"],
12 | "options": {
13 | "log": "info",
14 | "cache": false,
15 | "texecom": {
16 | "host": ""
17 | },
18 | "mqtt": {},
19 | "areas": [],
20 | "zones": []
21 | },
22 | "schema": {
23 | "log": "list(error|warning|info|panel|debug|trace)",
24 | "cache": "bool",
25 | "texecom": {
26 | "host": "str",
27 | "udl_password": "password?",
28 | "port": "int?"
29 | },
30 | "mqtt": {
31 | "host": "str?",
32 | "port": "int?",
33 | "prefix": "str?",
34 | "username": "str?",
35 | "password": "password?",
36 | "retain": "bool?",
37 | "retain_log": "bool?",
38 | "qos": "int(0,2)?",
39 | "client_id": "str?",
40 | "keepalive": "int?",
41 | "ca": "str?",
42 | "cert": "str?",
43 | "key": "str?",
44 | "reject_unauthorized": "bool?"
45 | },
46 | "homeassistant": {
47 | "discovery": "bool?",
48 | "prefix": "str?"
49 | },
50 | "zones": [
51 | {
52 | "id": "str?",
53 | "name": "str?",
54 | "device_class": "str?"
55 | }
56 | ],
57 | "areas": [
58 | {
59 | "id": "str?",
60 | "name": "str?",
61 | "full_arm": "str?",
62 | "part_arm_1": "str?",
63 | "part_arm_2": "str?",
64 | "part_arm_3": "str?",
65 | "code": "str?",
66 | "code_arm_required": "bool?",
67 | "code_disarm_required": "bool?"
68 | }
69 | ]
70 | },
71 | "arch": ["amd64", "armv7", "aarch64"]
72 | }
73 |
--------------------------------------------------------------------------------
/repository.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "texecom2mqtt Home Assistant Add-on",
3 | "url": "https://github.com/dchesterton/texecom2mqtt-hassio",
4 | "maintainer": "Daniel Chesterton "
5 | }
6 |
--------------------------------------------------------------------------------
/update.py:
--------------------------------------------------------------------------------
1 | import json
2 | import sys
3 |
4 | with open('config.json', 'r+') as f:
5 | data = json.load(f)
6 | data['version'] = sys.argv[1]
7 |
8 | f.seek(0)
9 | json.dump(data, f, indent=2)
10 | f.truncate()
11 |
--------------------------------------------------------------------------------