Git Product home page Git Product logo

paradox-esphome's Introduction

Paradox-ESPHome

Connect Paradox COMBUS (green-yellow wires which connect alarm system to the keypad) alarm interface to Home Assistant using esp8266 device and ESPHome library.

Currently the implementation is read-only, it shows motion, window/door, smoke sensor and alarm state status in Home Assistant (with a slight delay).

Example in Home Assistant

Image of HASS example

Wiring

Because Combus operates at ~12v, we need to step down voltage to levels suitable for esp2866.

Wiring example:

  Alarm Aux(+) --- Voltage regulator (5v for Wemos, NodeMCU, 3.3V for generic esp8266) --- VIN pin on esp8266

  Alarm Aux(-) --- esp8266 Ground

                                       +--- clock pin (Wemos, NodeMCU: D1, D2, D8)
  Alarm Yellow --- 15k ohm resistor ---|
                                       +--- 10k ohm resistor --- Ground

                                       +--- data read pin (Wemos, NodeMCU: D1, D2, D8)
  Alarm Green ---- 15k ohm resistor ---|
                                       +--- 10k ohm resistor --- Ground

When using different pins, be sure to modify sources to match your configuration.

OTA updates

In order to make OTA updates, connection switch in frontend must be switched to OFF.

Compatibility

Tested with "Trikdis SP231" alarm system which uses Paradox-compatible green-yellow data bus (COMBUS). Should work with other Paradox alarm systems.

References

Suggestions

This is a rough implementation, stability is not guaranteed. If you want a stable solution with read/write capability and your alarm system is compatible, take a look at Paradox Alarm Interface, which connects to alarm system by using serial port. In my case my alarm system was not compatible and had to use my own solution.

paradox-esphome's People

Contributors

margriko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paradox-esphome's Issues

Compile failed

Hey @Margriko

Trust this message finds you well.

I get the following error when compiling.

INFO Reading configuration /config/esphome/alarm.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/alarm
Processing alarm (board: nodemcuv2; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
Library Manager: Already installed, built-in library
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/api_connection.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/api_server.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/list_entities.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/proto.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/subscribe_state.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/user_services.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/api/util.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/binary_sensor/automation.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/binary_sensor/filter.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/logger/logger.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/ota/ota_component.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/restart/restart_switch.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/status_led/status_led.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/switch/automation.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/switch/switch.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/template/binary_sensor/template_binary_sensor.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/template/switch/template_switch.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/template/text_sensor/template_text_sensor.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/text_sensor/text_sensor.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/wifi/wifi_component.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/wifi/wifi_component_esp32.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/application.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/component.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/controller.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/esphal.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/helpers.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/log.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/preferences.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/scheduler.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/esphome/core/util.cpp.o
Compiling /data/alarm/.pioenvs/alarm/src/main.cpp.o
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:63:3: error: stray '\302' in program
   <title>Paradox-ESPHome/paradox_combus_esphome.h at master · Margriko/Paradox-ESPHome</title>
   ^
src/paradox_combus_esphome.h:63:3: error: stray '\267' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:193:12: warning: missing terminating ' character [enabled by default]
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="278578680" data-scoped-search-url="/Margriko/Paradox-ESPHome/search" data-owner-scoped-search-url="/users/Margriko/search" data-unscoped-search-url="/search" action="/Margriko/Paradox-ESPHome/search" accept-charset="UTF-8" method="get">
            ^
src/paradox_combus_esphome.h:193:7: error: missing terminating ' character
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="278578680" data-scoped-search-url="/Margriko/Paradox-ESPHome/search" data-owner-scoped-search-url="/users/Margriko/search" data-unscoped-search-url="/search" action="/Margriko/Paradox-ESPHome/search" accept-charset="UTF-8" method="get">
       ^
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:243:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:243:7: error: stray '\206' in program
src/paradox_combus_esphome.h:243:7: error: stray '\265' in program
src/paradox_combus_esphome.h:248:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:248:7: error: stray '\206' in program
src/paradox_combus_esphome.h:248:7: error: stray '\265' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:284:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:284:7: error: stray '\206' in program
src/paradox_combus_esphome.h:284:7: error: stray '\265' in program
src/paradox_combus_esphome.h:289:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:289:7: error: stray '\206' in program
src/paradox_combus_esphome.h:289:7: error: stray '\265' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:316:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:316:7: error: stray '\206' in program
src/paradox_combus_esphome.h:316:7: error: stray '\265' in program
src/paradox_combus_esphome.h:321:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:321:7: error: stray '\206' in program
src/paradox_combus_esphome.h:321:7: error: stray '\265' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:348:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:348:7: error: stray '\206' in program
src/paradox_combus_esphome.h:348:7: error: stray '\265' in program
src/paradox_combus_esphome.h:353:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
src/paradox_combus_esphome.h:353:7: error: stray '\206' in program
src/paradox_combus_esphome.h:353:7: error: stray '\265' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:402:10: warning: missing terminating ' character [enabled by default]
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="uEzFTpZfa8PIKEfT34q0rrr42eQeyiJJ5eWWZ5F+pUCArutyUXkkbCQqqrgudO7VzfLxpmyCVPb7M+qOJ1Y50g==" />
          ^
src/paradox_combus_esphome.h:402:5: error: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="uEzFTpZfa8PIKEfT34q0rrr42eQeyiJJ5eWWZ5F+pUCArutyUXkkbCQqqrgudO7VzfLxpmyCVPb7M+qOJ1Y50g==" />
     ^
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:668:41: error: stray '@' in program
                       Participating and @mentions
                                         ^
src/paradox_combus_esphome.h:671:93: error: stray '@' in program
                       Only receive notifications from this repository when participating or @mentioned.
                                                                                             ^
src/paradox_combus_esphome.h:749:95: error: stray '@' in program
                     Select events you want to be notified of in addition to participating and @mentions.
                                                                                               ^
src/paradox_combus_esphome.h:800:95: error: stray '@' in program
                     Select events you want to be notified of in addition to participating and @mentions.
                                                                                               ^
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:945:18: warning: missing terminating ' character [enabled by default]
             <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="btn-with-count" action="/Margriko/Paradox-ESPHome/fork" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="6+n8uGjgzkXikSMwijsY2TnhE+qt1r4sUneKDCoIjsqXnVb/7+cQBQ6fnTazti8nLIG4zYAFT4GGtxzowYZEzg==" />
                  ^
src/paradox_combus_esphome.h:945:13: error: missing terminating ' character
             <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="btn-with-count" action="/Margriko/Paradox-ESPHome/fork" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="6+n8uGjgzkXikSMwijsY2TnhE+qt1r4sUneKDCoIjsqXnVb/7+cQBQ6fnTazti8nLIG4zYAFT4GGtxzowYZEzg==" />
             ^
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:1152:25: warning: missing terminating " character [enabled by default]
             data-action="
                         ^
src/paradox_combus_esphome.h:1152:13: error: missing terminating " character
             data-action="
             ^
src/paradox_combus_esphome.h:1153:41: error: stray '#' in program
               input-entered:ref-selector#inputEntered
                                         ^
src/paradox_combus_esphome.h:1154:40: error: stray '#' in program
               tab-selected:ref-selector#tabSelected
                                        ^
src/paradox_combus_esphome.h:1155:38: error: stray '#' in program
               focus-list:ref-selector#focusFirstListMember
                                      ^
src/paradox_combus_esphome.h:1156:13: warning: missing terminating " character [enabled by default]
             "
             ^
src/paradox_combus_esphome.h:1156:13: error: missing terminating " character
src/paradox_combus_esphome.h:1174:80: warning: missing terminating ' character [enabled by default]
             <!-- TODO: this max-height is necessary or else the branch list won't scroll.  why? -->
                                                                                ^
src/paradox_combus_esphome.h:1174:13: error: missing terminating ' character
             <!-- TODO: this max-height is necessary or else the branch list won't scroll.  why? -->
             ^
src/paradox_combus_esphome.h:1203:25: warning: missing terminating " character [enabled by default]
             data-action="
                         ^
src/paradox_combus_esphome.h:1203:13: error: missing terminating " character
             data-action="
             ^
src/paradox_combus_esphome.h:1204:41: error: stray '#' in program
               input-entered:ref-selector#inputEntered
                                         ^
src/paradox_combus_esphome.h:1205:40: error: stray '#' in program
               tab-selected:ref-selector#tabSelected
                                        ^
src/paradox_combus_esphome.h:1206:38: error: stray '#' in program
               focus-list:ref-selector#focusFirstListMember
                                      ^
src/paradox_combus_esphome.h:1207:13: warning: missing terminating " character [enabled by default]
             "
             ^
src/paradox_combus_esphome.h:1207:13: error: missing terminating " character
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:1333:49: warning: missing terminating " character [enabled by default]
     <div data-target="readme-toc.content" class="Box mt-3 position-relative
                                                 ^
src/paradox_combus_esphome.h:1333:5: error: missing terminating " character
     <div data-target="readme-toc.content" class="Box mt-3 position-relative
     ^
src/paradox_combus_esphome.h:1334:5: warning: missing terminating " character [enabled by default]
     ">
     ^
src/paradox_combus_esphome.h:1334:5: error: missing terminating " character
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:1377:16: warning: missing terminating ' character [enabled by default]
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/Margriko/Paradox-ESPHome/edit/master/paradox_combus_src/paradox_combus_esphome.h" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="+IhHH3iQ7y2fmZIa8HKR6+XWPRDHYMwtgPyjUSuMJkFGesSBX0LS9ZdE2HHpsC7I97sY/yVPbzb/Yi7XouFllA==" />
                ^
src/paradox_combus_esphome.h:1377:11: error: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/Margriko/Paradox-ESPHome/edit/master/paradox_combus_src/paradox_combus_esphome.h" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="+IhHH3iQ7y2fmZIa8HKR6+XWPRDHYMwtgPyjUSuMJkFGesSBX0LS9ZdE2HHpsC7I97sY/yVPbzb/Yi7XouFllA==" />
           ^
src/paradox_combus_esphome.h:1385:16: warning: missing terminating ' character [enabled by default]
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/Margriko/Paradox-ESPHome/delete/master/paradox_combus_src/paradox_combus_esphome.h" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="cWeHH+BbReyl30+Q8Hm7+zKv2vQCNAGW1kuO0AL2sawM0nRZkBSSLkVQ+epndTVMZUEfcBORsQ3Nm3G17tcJyg==" />
                ^
src/paradox_combus_esphome.h:1385:11: error: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/Margriko/Paradox-ESPHome/delete/master/paradox_combus_src/paradox_combus_esphome.h" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="cWeHH+BbReyl30+Q8Hm7+zKv2vQCNAGW1kuO0AL2sawM0nRZkBSSLkVQ+epndTVMZUEfcBORsQ3Nm3G17tcJyg==" />
           ^
src/paradox_combus_esphome.h:1442:69: error: stray '#' in program
         <td id="LC1" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>esphome.h<span class="pl-pds">&quot;</span></span></td>
                                                                     ^
src/paradox_combus_esphome.h:1451:69: error: stray '#' in program
         <td id="LC3" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">define</span> <span class="pl-en">CLK</span> <span class="pl-c1">5</span> <span class="pl-c"><span class="pl-c">//</span> Keybus Yellow</span></td>
                                                                     ^
src/paradox_combus_esphome.h:1455:69: error: stray '#' in program
         <td id="LC4" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">define</span> <span class="pl-en">DTA</span> <span class="pl-c1">4</span> <span class="pl-c"><span class="pl-c">//</span> Keybus Green</span></td>
                                                                     ^
src/paradox_combus_esphome.h:2127:258: error: stray '#' in program
         <td id="LC165" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">bool</span> <span class="pl-c1">open</span> = msg[<span class="pl-c1">17</span> + (i * <span class="pl-c1">2</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>;</td>
                                                                                                                                                                                                                                                                  ^
src/paradox_combus_esphome.h:2127:292: error: stray '#' in program
         <td id="LC165" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">bool</span> <span class="pl-c1">open</span> = msg[<span class="pl-c1">17</span> + (i * <span class="pl-c1">2</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>;</td>
                                                                                                                                                                                                                                                                                                    ^
src/paradox_combus_esphome.h:2205:249: error: stray '#' in program
         <td id="LC184" class="blob-code blob-code-inner js-file-line">    <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">7</span>) + <span class="pl-c1">1</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>0<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                         ^
src/paradox_combus_esphome.h:2205:283: error: stray '#' in program
         <td id="LC184" class="blob-code blob-code-inner js-file-line">    <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">7</span>) + <span class="pl-c1">1</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>0<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                           ^
src/paradox_combus_esphome.h:2217:251: error: stray '#' in program
         <td id="LC187" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">5</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                           ^
src/paradox_combus_esphome.h:2217:285: error: stray '#' in program
         <td id="LC187" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">5</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                             ^
src/paradox_combus_esphome.h:2241:251: error: stray '#' in program
         <td id="LC193" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">6</span>) + <span class="pl-c1">5</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                           ^
src/paradox_combus_esphome.h:2241:285: error: stray '#' in program
         <td id="LC193" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">6</span>) + <span class="pl-c1">5</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                             ^
src/paradox_combus_esphome.h:2265:251: error: stray '#' in program
         <td id="LC199" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">1</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                           ^
src/paradox_combus_esphome.h:2265:285: error: stray '#' in program
         <td id="LC199" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">1</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                             ^
src/paradox_combus_esphome.h:2277:253: error: stray '#' in program
         <td id="LC202" class="blob-code blob-code-inner js-file-line">        <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">0</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                             ^
src/paradox_combus_esphome.h:2277:287: error: stray '#' in program
         <td id="LC202" class="blob-code blob-code-inner js-file-line">        <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">0</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                               ^
src/paradox_combus_esphome.h:2301:284: error: stray '#' in program
         <td id="LC208" class="blob-code blob-code-inner js-file-line">        <span class="pl-k">else</span> <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">0</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>0<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                            ^
src/paradox_combus_esphome.h:2301:318: error: stray '#' in program
         <td id="LC208" class="blob-code blob-code-inner js-file-line">        <span class="pl-k">else</span> <span class="pl-k">if</span> (msg[((<span class="pl-c1">8</span> * <span class="pl-c1">2</span>) + <span class="pl-c1">0</span>)] == <span class="pl-s"><span class="pl-pds">&#39;</span>0<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                                                                                                              ^
src/paradox_combus_esphome.h:3070:198: error: stray '#' in program
         <td id="LC392" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (str[length - j - <span class="pl-c1">1</span>] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                      ^
src/paradox_combus_esphome.h:3070:232: error: stray '#' in program
         <td id="LC392" class="blob-code blob-code-inner js-file-line">      <span class="pl-k">if</span> (str[length - j - <span class="pl-c1">1</span>] == <span class="pl-s"><span class="pl-pds">&#39;</span>1<span class="pl-pds">&#39;</span></span>)</td>
                                                                                                                                                                                                                                        ^
src/paradox_combus_esphome.h:3239:12: warning: missing terminating ' character [enabled by default]
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get">
            ^
src/paradox_combus_esphome.h:3239:7: error: missing terminating ' character
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get">
       ^
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:3302:5: error: stray '\342' in program
     You can’t perform that action at this time.
     ^
src/paradox_combus_esphome.h:3302:5: error: stray '\200' in program
src/paradox_combus_esphome.h:3302:5: error: stray '\231' in program
In file included from src/main.cpp:30:0:
src/paradox_combus_esphome.h:7:1: error: expected unqualified-id before '<' token
 <!DOCTYPE html>
 ^
*** [/data/alarm/.pioenvs/alarm/src/main.cpp.o] Error 1
========================= [FAILED] Took 16.53 seconds =========================

I saved your paradox_combus_esphome.h in config \ esphome \ paradox_combus_src and use alarm.yaml for NodeMCU configuration.

esphome:
  name: alarm
  platform: ESP8266
  board: nodemcuv2
  
  includes:
    - paradox_combus_src/

wifi:
  ssid: !secret esphomessid
  password: !secret esphomepass

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Alarm"
    password: !secret esphomepass

#captive_portal:

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:

status_led:
  pin:
    number: D4
    inverted: yes

custom_component:
- lambda: |-
    auto combusEsp = new ParadoxCombusEsphome();
    
    combusEsp->onAlarmStatusChange([&](std::string statusCode) {
      if (id(alarm_status).state != statusCode) {
        id(alarm_status).publish_state(statusCode);
      }
    });
    
    combusEsp->onZoneStatusChange([&](uint8_t zone, bool open) {
      switch (zone) {
        case 1: id(z1).publish_state(open); break;
        case 2: id(z2).publish_state(open); break;
        case 3: id(z3).publish_state(open); break;
        case 4: id(z4).publish_state(open); break;
        case 5: id(z5).publish_state(open); break;
        case 6: id(z6).publish_state(open); break;
        case 7: id(z7).publish_state(open); break;
        case 8: id(z8).publish_state(open); break;
        case 9: id(z9).publish_state(open); break;
      }
    });
    return {combusEsp};
binary_sensor:
  - platform: template
    id: z1
    name: "Entrance motion"
    device_class: motion
  - platform: template
    id: z2
    name: "Living room motion"
    device_class: motion
  - platform: template
    id: z3
    name: "Terrace door"
    device_class: door
  - platform: template
    id: z4
    name: "Service room motion"
    device_class: motion
  - platform: template
    id: z5
    name: "Service room door"
    device_class: door
  - platform: template
    id: z6
    name: "Child room motion"
    device_class: motion
  - platform: template
    id: z7
    name: "Bedroom motion"
    device_class: motion
  - platform: template
    id: z8
    name: "Smoke detector"
    device_class: smoke
  - platform: template
    id: z9
    name: "Entrance door"
    device_class: door

text_sensor:
  - platform: template
    id: alarm_status
    name: "Alarm Status"
    icon: "mdi:shield"
    
switch:
  - platform: template
    name: "Alarm Connection"
    id: connection_status_switch
    lambda: |-
      return getCombusConnectionStatus();
    icon: "mdi:shield-link-variant"
    turn_on_action:
      - switch.toggle: restart_switch
    turn_off_action:
      - lambda: |-
          disconnectCombus();
  - platform: restart
    id: restart_switch

Do you have any idea what I'm doing wrong?

Thanks,
Vlad

NodeMCU blinks fast when CLK pin is connected.

Hi there, I am trying to connect a NodeMCU running the code on my Paradox alarm system. I followed the diagram (As far as I know) and as soon as I connect the CLK (Yellow wire) to the pin, the blue light starts flashing quickly and then it disconnect. It won't event connect is restarted with the pin connected, but if I start it without connecting the pin just to test, I see it, but then as soon as the pin gets connected it crashes.

I am not that familiar with that type of development so I might be missing something stupid as to how I should troubleshoot this. When looking at references you used for your development, I saw that they were using 33k ohm resistor instead of 15k. I tried and has the same problem. How could I troubleshoot the startup of the NodeMCU?

Is this a behavior you have seen while developing on your side? I tried changing pin and had the same problem with D1, D2 and D8. If I don't call 'attachInterrupt' on the pin it doesn't fail, but as long as I change the code to point to that pin, and connect the CLK it fails.

Thanks for any support you can provide!

Wemo D1 mini

Not an issue, rather a request for help (the discussion section is unfortunately not available).

Thanks for your work on connecting Paradox alarm panels to HomeAssistant.

I'm planning to connect unidirectionally my old Paradox Spectra 1728EX panel to HomeAssistant and your work and repo gave me a hope that it can be done.
I'm planning to connect it via Wemo D1 mini that supports I2C and SPI modes [1]. Looking at your wiring diagram, since your diagram uses only a clock and a data pin I suppose it's I2C. Could you please confirm?
Since I plan to power the Wemo D1 mini from an USB adapter I presume that the Alarm Aux +/- connections are not needed. Neither the voltage regulator. Am I right?

Thanks in advance.

[1] https://escapequotes.net/esp8266-wemos-d1-mini-pins-and-diagram/

Question only about Combus

By Combus do you mean the yellow and green wires?

I have a trikdis SP3 panel now and am really interested in trying to integrate this with home assistant.

My panel has a 5v output, possibly an extra combus output on the side of the 5v. I'd have to check as I don't recall off the top of my head.

I notice there is no discussion option on this repo.

Many thanks

Just looked at the pdf and it has a 485 output for the RS485 data bus. Can these be used for the esp32?
Plus these:

+5 V Positive 5 V power terminal for 1-Wire devices
1 WIRE 1-Wire data bus terminal
C Common negative terminal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.