Skip to content

Commit

Permalink
Merge pull request #4 from AzonInc/dev
Browse files Browse the repository at this point in the history
PCB Rev 1.4
  • Loading branch information
AzonInc committed May 21, 2024
2 parents 72d1bf4 + 21811cb commit 447c758
Show file tree
Hide file tree
Showing 21 changed files with 3,763 additions and 3,162 deletions.
Binary file modified .github/images/pcb_bottom_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/pcb_top_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/pcbway_delivery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/title_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/wiring_2wire_power_a_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/wiring_2wire_power_usb_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/wiring_3wire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 71 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@
<br>
</h1>

This repository contains the source files for the Doorman S3 Intercom Gateway, a device which lets you connect your [TCS](https://www.tcsag.de/) or [Koch](https://www.kochag.ch/) intercom to any home automation system.
This repository contains the source files for the Doorman S3 Intercom Gateway, a device which lets you connect your [TCS](https://www.tcsag.de/) or [Koch](https://www.kochag.ch/) intercom to any home automation system.\
There are also some rebranded [Niko](https://www.niko.eu/) intercoms which are counterparts of the TCS and Koch ones.

However it's not limited to TCS and Koch intercoms only.
With the integrated relais you can easily simulate a button press to trigger the door opener or the light (up to 40V, max 2.5A).
However it's not limited to these intercoms only.
With the integrated relay you can easily simulate a button press to trigger the door opener or the light (up to 40V, max 2.5A).

If your intercom is not a TCS or Koch one but operates on a 2-wire bus (14-24V) it might be possible to implement other protocols as well.
If your intercom is not a TCS or Koch one but operates on a 2-wire bus within the 14-24V range it might be possible to implement other protocols as well.

You could also monitor the voltage level on older intercoms (14-24V) by replacing the tcs_intercom component with a template Binary Sensor combined with ADC and trigger specific actions based on it.

<!--
## 📦 Interested in buying one?
Thanks a lot to PCBWay for sponsoring this Project.
Scroll down to "Manufacturing" to read more.

I still have some PCBs left. They are fully assembled and tested and come with ESPHome pre-Installed for direct integration and adoption into Home Assistant.
## 📦 Interested in buying one?

Feel free to contact me on [Discord](https://discord.gg/t2d34dvmBf), [GitHub Issues](https://github.com/AzonInc/Doorman/issues) or by [E-Mail](mailto:[email protected]?subject=Doorman).
-->

I offer you a fully assembled and tested Doorman-S3 for **26€** which comes with ESPHome pre-Installed for direct integration and adoption into Home Assistant.

## 📫 Have a question? Ran into a problem?

Expand All @@ -45,7 +47,7 @@ At the root of the repository you will find these directories:
- 2 additional GPIO via Screw Terminal for easy expansion with your own sensors and devices
- 1 Relay via Screw Terminal to switch up to 40V (max. 2.5A) for oldschool intercom systems
- 1 External Button via Screw Terminal (G + BTN)
- Bridge Rectifier on the Bus Input to correct wire polarity
- Bridge Rectifier for the Bus-wire input to correct polarity
- TCS Bus Communication (e.g. Open the front door, Detect Doorbell)
- You can optionally use your Doorman as a Nuki Bridge (incompatible with Nuki App, Bluetooth only)

Expand All @@ -54,7 +56,7 @@ At the root of the repository you will find these directories:

The ESPHome Doorman Stock Firmware implements the following:
- **Party Mode**\
Automatically opens the Door when the Doorbell is pressed.\
Automatically opens the Door when the doorbell button is pressed.\
The Party Mode Switch Entity is disabled by default.

Furthermore you could implement the following:
Expand All @@ -80,37 +82,67 @@ This Configuration inherits everything from the Stock Firmware and adds a Nuki B
You need to adjust a few things to make it work with Doorman S3.

## ⚡ Wiring
If your Intercom is connected in 2-wire mode and you dont have a separate 24V P-Line you need to use an external Power Supply via USB-C or P (+5V to +24V) and B (Ground) Screw Terminal.\
If your Intercom is connected in 2-wire mode and you dont have a separate 24V P-Line you need to use an external Power Supply via USB-C or P (+5V to +30V) and B (Ground) Screw Terminal.\
If it is connected in 3-wire mode you should be able to use the P-Line to power your Doorman in most cases.

### Intercom Screw Terminal Explanation:
- **a** is usually the Bus line (+24V)
- **b** is usually GND
- **P** is the +24V line in 3-wire mode or just the apartment bell button in 2-wire mode

> ✅ On some installations the a and b wires are twisted but it doesn't matter because Doorman has an integrated bridge rectifier to fix that for you.

> [!NOTE]
> On some installations the a and b wires are twisted but it doesn't matter because Doorman has an integrated bridge rectifier to handles that for you.
> However if you want to power your Doorman in two-wire-mode using the bus wire it's only possible with hardware revision >= V1.4.
>⚠️ **BE AWARE**\
> [!WARNING]
> The minimum output current of the intercom power supply **must be 60mA** in order to achieve a stable operation!\
> However it is possible that some other devices using the 24V-wire are taking too much current so it's not sufficient to power Doorman anymore.\
> A best case scenario would be that you can use the P-wire with 60mA. That doesn't work for everyone tho.\
> A best case scenario would be that you can use the P-wire with 60mA. That doesn't work for everyone tho.
>
> **Please power your Doorman with an external Power Supply (USB-C or Screw Terminal) if your Intercom provides less than 60mA or whenever you notice an unstable operation.**
> **Please power your Doorman with an external Power Supply (USB-C or Screw Terminal) if your intercoms power supply provides less than 60mA or whenever you notice an unstable operation.**
> [!CAUTION]
> **DO NOT USE THE +24V P-LINE AND USB-C AT THE SAME TIME**
### Steps:
>⚠️ **DO NOT USE THE +24V P-LINE AND USB-C AT THE SAME TIME**
### Possible Wiring:
#### 2-Wire Mode (with external Power Supply)
<img src=".github/images/wiring_2wire_power_screwterminal.png" alt="2 Wire Installation" height="275">

> [!IMPORTANT]
> Please check the polarity of a- and b-wires as the bridge rectifier can only handle two wires but not three.
> Be sure to connect the ground wire of your external power supply to the same Screw Terminal as the ground wire that comes from your intercom.
1. Open the Intercom enclosure
2. Connect the a-wire (24V Bus) to the a-Terminal of your Doorman
3. Connect the b-wire (Ground) to the b-Terminal of your Doorman
4. Connect an external Power Supply via USB-C Port or P (+5V to +24V) and b (Ground) Screw Terminals of your Doorman
2. Connect the a-wire (24V Bus) to one of the TCS:BUS-Terminals of your Doorman
3. Connect the b-wire (Ground) to the other TCS:BUS-Terminal of your Doorman
4. Connect an external Power Supply via USB-C Port or P (+5V to +30V) and b (Ground) Screw Terminals of your Doorman

#### 2-Wire Mode (with external Power Supply via USB-C)
<img src=".github/images/wiring_2wire_power_usb_c.png" alt="2 Wire Installation" height="275">

1. Open the Intercom enclosure
2. Connect the a-wire (24V Bus) to one of the TCS:BUS-Terminals of your Doorman
3. Connect the b-wire (Ground) to the other TCS:BUS-Terminal of your Doorman
4. Connect an external Power Supply via USB-C Port

#### 2-Wire Mode (with power via a-Terminal)
<img src=".github/images/wiring_2wire_power_a_terminal.png" alt="2 Wire Installation" height="275">

> [!IMPORTANT]
> Only applicable to hardware revision 1.4
1. Open the Intercom enclosure
2. Connect the a-wire (24V Bus) to one of the TCS:BUS-Terminals of your Doorman
3. Connect the b-wire (Ground) to the other TCS:BUS-Terminal of your Doorman
4. Connect the a-wire (24V Bus) to the P-Terminal of your Doorman

#### 3-Wire Mode (with sufficient Intercom Power Supply - min. 60mA)
<img src=".github/images/wiring_3wire.png" alt="3 Wire Installation" height="275">

1. Open the Intercom enclosure
2. Connect the a-wire (24V Bus) to the a-Terminal of your Doorman
3. Connect the b-wire (Ground) to the b-Terminal of your Doorman
2. Connect the a-wire (24V Bus) to one of the TCS:BUS-Terminals of your Doorman
3. Connect the b-wire (Ground) to the other TCS:BUS-Terminal of your Doorman
4. Connect the P-wire (+24V) to the P-Terminal of your Doorman

## 📟 Obtaining Command Codes from the Bus
Expand All @@ -125,18 +157,30 @@ You can find a detailed explanation in the repository. It's kinda similar.

## 🛠️ Manufacturing

TODO
<img src=".github/images/pcbway_delivery.png" alt="PCBWay Delivery" height="275">

I didnt know which pcb manufacturer is good but fortunately PCBWay reached out to me and offered to sponsor PCB fabrication.\
Well... I'm more than satisified with the quality, especially the nice colors. Everything looks clean and part sourcing was an ease. They also sent me two more unpopulated PCBs extra.
I soldered the ESP Modules using a heating plate myself because I still had ESP32 Modules at home.

It was really easy to get in touch with them and whenever there rised a question they didn't hesitate to ask.
A special thanks goes to Liam and Lynne for supporting me throughout the entire process. Even tho I made a lot of changes they were always very patient with me. It was a pleasure working with you guys.

If you need a good quality one stop manufacturer I can definitely recommend PCBWay :)

You can find all the neccessary files [here](https://github.com/AzonInc/doorman/tree/master/pcb).

## 🖨️ Enclosure

Depending on your needs you can print your own Doorman Enclosure.\
Just use the STL files provided [here](https://github.com/AzonInc/Doorman/tree/master/enclosure).\
In case you want an enclosure you can print your own one.\
Just use the STL files provided [here](https://github.com/AzonInc/Doorman/tree/master/enclosure) and you'll be good to go.\
<img src=".github/images/enclosure.png" alt="Doorman S3" height="275">

## ⚠️ Disclaimer

Please DO NOT use the +24V P-Line if the Power Supply is not powerful enough.\
Check your Power Supply first as there are some Power Supply Models which supply less than 60mA on 24V and that won't be enough to power the ESP32.
It is possible that the intercoms power supply can not provide enough power because other devices are taking too much current.\
In that case you need to use an external power supply via USB-C or Screw Terminals (P and one of TCS:BUS).

## 🙌 Contributing
If you would like to contribute, please feel free to open a Pull Request.
Expand All @@ -162,4 +206,4 @@ The main goal is to provide a proper PCB for his Doorman Project.
This module builds an ESPHome lock platform for Nuki Smartlock (nuki_lock).

**[AStrehlau](https://github.com/AStrehlau)**\
Thanks a lot for your time, patience and every single valuable advice that made this Project better, smaller and more affordable.
Thanks a lot for your time, patience, knowledge and every single valuable advice that made this Project better, smaller and more affordable.
2 changes: 1 addition & 1 deletion firmware/addons/nuki-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ esphome:
- https://github.com/AzonInc/NukiBleEsp32

external_components:
- source: github://AzonInc/ESPHome_nuki_lock@master
- source: github://AzonInc/ESPHome_nuki_lock@main

# Pairing Mode
binary_sensor:
Expand Down
33 changes: 19 additions & 14 deletions firmware/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ esphome:

project:
name: "AzonInc.Doorman S3"
version: "1.2.0"
version: "1.3.0"

on_boot:
then:
- light.turn_on:
id: doorman_rgb_status_led
effect: slow_pulse
red: 100%
green: 60%
blue: 0%
effect: pulse
red: 0%
green: 56%
blue: 52%
- wait_until:
condition:
wifi.connected:
- light.turn_on:
id: doorman_rgb_status_led
effect: pulse
effect: slow_pulse
red: 0%
green: 100%
blue: 0%
green: 30%
blue: 100%
- wait_until:
condition:
api.connected:
- light.turn_on:
id: doorman_rgb_status_led
effect: none
red: 0%
green: 100%
blue: 0%
- delay: 1s
green: 30%
blue: 100%
- delay: 3s
- script.execute: reset_led

# Board Setup
Expand Down Expand Up @@ -81,7 +81,8 @@ ota:

wifi:
ap:
password: "doorman-s3"
ssid: "Doorman-S3 Setup"
password: "open-sesame"

captive_portal:

Expand Down Expand Up @@ -114,7 +115,7 @@ switch:
red: 100%
green: 100%
blue: 3%
effect: pulse
effect: slow_partymode

turn_off_action:
- light.turn_off: doorman_rgb_status_led
Expand Down Expand Up @@ -160,7 +161,7 @@ light:
chipset: ws2812
gamma_correct: 1
default_transition_length: 0ms
color_correct: [80%, 80%, 80%]
color_correct: [50%, 50%, 50%]
effects:
- pulse:
name: pulse
Expand All @@ -170,6 +171,10 @@ light:
name: slow_pulse
transition_length: 1s
update_interval: 2s
- pulse:
name: slow_partymode
transition_length: 3s
update_interval: 3s

binary_sensor:
- platform: status
Expand Down
5 changes: 4 additions & 1 deletion firmware/doorman-stock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ dashboard_import:
import_full_config: false

packages:
device_base: !include base.yaml
device_base: !include base.yaml

esp32_improv:
authorizer: none
2 changes: 1 addition & 1 deletion pcb/bom/ibom.html

Large diffs are not rendered by default.

Loading

0 comments on commit 447c758

Please sign in to comment.