Git Product home page Git Product logo

doorman's Introduction

Doorman

Doorman is an ESP32 or ESP8266 based mqtt bridge to connect your TCS or Koch Intercom to any home automation system.

doorman opener

Main Features

  • Support for TCS bus based intercom systems from TCS AG (Germany) or Koch AG (Switzerland)
  • Automatic Homeassistant discovery via MQTT
  • MQTT integration for all messages read from the bus and for writing messages to the bus
  • Button push pattern detection - you can define a pattern and assign a code that is written to the bus if the pattern is detected (Example: automatically open the door if the doorbell is pressed x times in a certain way). A successfully detected pattern is also published via mqtt.
  • Party mode (When this is enabled, the door opener automatically opens if the door bell is pressed)

Party Mode

When Party mode is enabled, a code (default: entry door buzzer code) is automatically sent when a certain code has been received on the bus (default: entry door bell code).

This allows you to enable party mode during a party and your guests can just enter by pressing your door bell when they arrive or go for a smoke.

Party mode can be turned on or off by using the switch on in Homeassistant, or by quickly lifting up you handset 3x (if your handset code has been configured correctly).

How to get Codes

Connect doorman to an mqtt broker by setting up WiFi credentials and mqtt broker.

If you already have Homeassistant configured with the mqtt integration on the same broker, go to Settings -> Devices -> Doorman. You should see a text entity called "TCS Bus". This entity allows to read all messages from the bus and write to the bus. Do the action for the signal you want to get the code of (apartment door bell, entry door bell or lifting up your handset). In the history of the TCS Bus entity you should see all codes that have been read from the bus. Then you can copy the values to the configuration settings in the home assistant device.

The codes that are specific to your flat are the long ones (without 0000 prefix).

TCS Bus

Prebuilt PCB and Case

AzonInc created a PCB with the doorman circuits and 3D printable housing. The project supports integration via ESPhome.

https://github.com/AzonInc/Doorman

It's currently a work in progress and I haven't added official support to the platformio project yet.

Wiring

wiring If you open your phone in your flat (check TCS website for manuals), you will probably find the following screw terminal lines: A, B, E, P.

A and B are the bus lines. You have to make sure which one is 24V+ and wire this to A of the setup. The other one is GND.

The P line can be used for power supply. You can also skip the part and power through the USB port of the Wemos D1.

Part list

TODO

There are still a view things open.

  • Allow wifi/mqtt configuration without the need for project compilation

Credits

Doorman is heavily built on the code and the information of the following two projects:

Doorman S3 PCB and case for TCS intercom with ESPhome firmware
https://github.com/AzonInc/Doorman

TCSIntercomArduino different methods to read from and write to TCS bus
Reverse Engineering video: https://www.youtube.com/watch?v=xFLoauqj9yA&t=11s
https://github.com/atc1441/TCSintercomArduino

tcs-monitor an mqtt monitor for listening to the TCS bus
Blog Post: https://blog.syralist.de/posts/smarthome/klingel/
https://github.com/Syralist/tcs-monitor

doorman's People

Contributors

peteh avatar

Stargazers

jctots avatar Mario Guggenberger avatar  avatar  avatar Alexander Kauerz avatar Flo avatar Alexandre Macabies avatar Danny Meier avatar  avatar  avatar  avatar Eduard Matúš avatar Kristian Nilsen avatar Matej Bartalsky avatar Fabian Wilk avatar Marc Stirner avatar  avatar  avatar Thorsten avatar Thomas Helmke avatar  avatar Hendrik Kuck avatar

Watchers

 avatar  avatar  avatar

doorman's Issues

Bus is only read sometimes because WiFi is not properly connected

Listening to the bus is realy unreliable as I often (60% of the time) have no code in the log.

I can see the LED on the board react when picking up the phone or pressing the bell but no entry in the logbook.

I have reinstalled the mqtt-broker (as the device disappeared sometimes and I hoped to fix booth problems) and even installed a different one but no improvement for now for this problem (the esp stopped disappearing).

This is the wiring at the moment with external powersupply and without the parts for button and led.
image

Bug building TCS Doorman for D1 Mini

Building for D1 mini failed with the following error:

src\main.cpp: In function 'void callback(char*, byte*, unsigned int)':
src\main.cpp:389:14: warning: unused variable 'pressed' [-Wunused-variable]
  389 |         bool pressed = strncmp((char *)payload, g_mqttView.getDiagnosticsResetButton().getPressState(), length) == 0;
      |              ^~~~~~~
src\main.cpp: In lambda function:
src\main.cpp:511:9: error: 'esp_task_wdt_reset' was not declared in this scope
  511 |         esp_task_wdt_reset();
      |         ^~~~~~~~~~~~~~~~~~
*** [.pio\build\d1_mini\src\main.cpp.o] Error 1

I think it has to do something with the most recent changes in the code..

Integration for the E terminal line

Help Wanted (as I can not add labels)

Is it possible to integrate the E line into the microcontroller, which is used for the bell button in front of the apartment door, so I can work with it in Homeassistant?

I would only want it to be the same like the the bell button on the front door, but I guess this one does not run over the bus, so it would only need to register if there is a signal or not which I then would use to create a signal in Homeassistant I can automate with.

This is my first little project and pretty much my first time wiring, soldering and programming stuff like this so it´s a little to much for me.
Im only asking for help with the wiring, the programming I would probably manage by myself somehow.

General questions to functionality and possible problems

I had some questions regarding functions, I can split the issue if needed and I would try to add it to the Readme if that would be okay (I like documentation)

1:
How exactly do I create a pattern to be recognized? If I understand description on the "codes" page running on the ESP they should be a hexadezimal number, how do I write a pattern in hexadezimal, or is it meant as "if this code is detected..."?
image

2:
If I understood the project-code correctly, if I press one of the "Controls" on the device in Homeassistant the ESP sends the configured code on the bus and the correlating function should happen (door opener, bell rings) right? If not the text after this can be ignored as its written with the assumption that it works that way.

Its not working for me as it does not happen with any "Control" I try to activate, no bell and no opener.
I can see that the code change on the bus but nothing else happens.

I have checked the codes multiple times and they should be correct so I dont know why it does not work.

"esp_task_wdt.h" missing when building project

Description:
When building the project for a d1-mini in VsCode with Platformio on Windows I get the following error message.
image

I have tried finding where that file comes from but I can only find it online as part of this github "https://github.com/pycom/esp-idf-2.0/blob/master/components/esp32/include/esp_task_wdt.h".
Is it part of some ESP32 libraries which cant be used on a ESP8266 board?

Trace:

Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (4.2.1) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
 - tool-esptool @ 1.413.0 (4.13)
 - tool-esptoolpy @ 1.30000.201119 (3.0.0)
 - toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 44 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoJson @ 6.21.5
|-- PubSubClient @ 2.8.0
|-- libesplog @ 0.0.1+sha.335d30f   
|-- libmqttdisco @ 0.0.1+sha.af15d5c
|-- ArduinoOTA @ 1.0
|-- DNSServer @ 1.1.1
|-- ESP8266mDNS @ 1.2
|-- ESP8266WebServer @ 1.0
|-- ESP8266WiFi @ 1.0
|-- LittleFS @ 0.1.0
|-- tcsbus
|-- pattern
Building in release mode
Compiling .pio\build\d1_mini\src\main.cpp.o
Archiving .pio\build\d1_mini\lib328\libPubSubClient.a
Archiving .pio\build\d1_mini\lib316\libesplog.a
Archiving .pio\build\d1_mini\lib1d7\libmqttdisco.a
Compiling .pio\build\d1_mini\liba26\ESP8266WiFi\WiFiClientSecureBearSSL.cpp.o
Compiling .pio\build\d1_mini\liba26\ESP8266WiFi\WiFiServer.cpp.o
Compiling .pio\build\d1_mini\liba26\ESP8266WiFi\WiFiServerSecureBearSSL.cpp.o
Compiling .pio\build\d1_mini\liba26\ESP8266WiFi\WiFiUdp.cpp.o
Compiling .pio\build\d1_mini\liba26\ESP8266WiFi\enable_wifi_at_boot_time.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\ESP8266mDNS.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\LEAmDNS.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\LEAmDNS_Control.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\LEAmDNS_Helpers.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\LEAmDNS_Structs.cpp.o
Compiling .pio\build\d1_mini\lib938\ESP8266mDNS\LEAmDNS_Transfer.cpp.o
Compiling .pio\build\d1_mini\lib85e\ArduinoOTA\ArduinoOTA.cpp.o
Compiling .pio\build\d1_mini\lib720\DNSServer\DNSServer.cpp.o
Compiling .pio\build\d1_mini\lib3ba\ESP8266WebServer\detail\mimetable.cpp.o
Compiling .pio\build\d1_mini\lib68b\LittleFS\LittleFS.cpp.o
Archiving .pio\build\d1_mini\lib3ba\libESP8266WebServer.a
src\main.cpp:27:10: fatal error: esp_task_wdt.h: No such file or directory

**********************************************************************
* Looking for esp_task_wdt.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_task_wdt.h"
* Web  > https://registry.platformio.org/search?q=header:esp_task_wdt.h
*
**********************************************************************

   27 | #include <esp_task_wdt.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\d1_mini\src\main.cpp.o] Error 1
======================================================================================================== [FAILED] Took 3.43 seconds ========================================================================================================

Installation/Compiling instructions/documentation

Hey,

first, thanks for the project/work.

I wanted to start using it, but have no clue how to compile/build the project and how to flash it.
Would it be possible to write a short guide/documentation on how to build and flash it?

Thanks in advance.

Board Design Frage

Hi,

erstmal vielen Dank für dieses Projekt 💯

Ich bin derzeit dabei mit Hilfe deines Codes eine ESPHome Komponente zu schreiben (Ich werde das Ergebnis dann gern zur Verfügung stellen wenn alles funktioniert) und habe dabei auch im allgemeinen versucht die Hardware weitestgehend zu verkleinern und auf das Minimum zu reduziere, damit das ganze problemlos in eine Unterputzdose hinter der Gegensprechanlage passt.

Nun hoffe ich dass ich dabei alle Verbindungen und Komponenten berücksichtigt habe und noch alles korrekt verbunden ist.
Der D1 Mini ist jetzt zum aufstecken vorgesehen, falls es mal zu einem Defekt kommen sollte.

image

Habe ich irgendwas beim Schaltplan vergessen?

No Codes :(

Hello,
I am enthusiastic about your project and have soldered together a board according to the instructions. Flashing the d1mini also worked without any problems. The connection to Homeassistant also works. Unfortunately, I do not get any values displayed in the TCS bus. Is it possible to narrow down the source of the error?
I have attached a picture of the circuit board and the wall unit.

I tried it with USB power supply, and also flashed different d1 minis. for the 147kohm I connected 100 and 47 in series.

Regards
20231109_211802
20231109_211810
20231109_212840

Koch TC30 Integration

New Thread für die TC30 Integration von Koch

Ziel:

  • Test ob Doorman mit TC30 funktioniert Out of the box

Folgendes wurde bereits geklärt in Issue Board Design Frage mit @AzonInc

  • TC30 KOCH ist die CH (Schweizer) version von TCS
  • a (DC+) und b (DC-) sind auf 24v
  • 6ms, 2ms, 4ms datenblöcke sind vorhanden
  • Steuergerät ist vermutlich BVS20

TC30 Anschluss Platte

Anmerkung zum Bild: bei a + b sind ein schwarzes und weisses Kabel zusätzlich angehängt - diese sind separat und gehören nicht zur TC30 installation. Sie wurden für die Nello installation verwendet.

20240406_211514

Tür Öffnungs Trigger

IMAGE2

Hier noch die Schemas von TC:Bus plus Beiblatt
Schema TC_Bus _ 1 Eingang, Anbindung an IP-Netzwerk, pot.freier Türöffnerkontakt - TC204_AVS 2100_LR12ACF.pdf
Beiblatt zu Schemas TCBus.pdf
Beiblatt zu Schemas TCBus.pdf
Schema TC_Bus _ 1 Eingang, Anbindung an IP-Netzwerk, pot.freier Türöffnerkontakt - TC204_AVS 2100_LR12ACF.pdf

3D Case fuer PCB

Um die Diskussion von 3d Gehause und PCB etwas zu isolieren hier das Issue fuers 3d Case.

TCS-Reader Question

Hi, can you please explain to me how exactly the TCS Reader works? Unfortunately I am not very familiar with the used language in this project as is. As I am working on a similar project (but on raspberry pico with micropython), and my approach is not really working (I get a different message every time I ring my bell), I appreciate any help and/or explanation. What really confuses me is the fact, that one message I have recorded seems to be the correct one, If I am writing this message to the bus, my bell rings. But as I said, my reader reads a different message every time (and therefore it is not reliable). thank you very much!

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.