Use a Raspberry Pico W with this Micropython code to control your TCS:Bus door intercom from your FHEM instance, for example trigger the light or trigger the door opener. And get alerts in FHEM, if someone rings your doorbell or the front doorbell.
Go to file
Manuel Kamper bfe51ffd5b „secrets.py“ ändern 2022-12-18 13:27:51 +00:00
docs Dateien hochladen nach „docs“ 2022-12-17 21:53:57 +00:00
kicad Dateien hochladen nach „kicad“ 2022-12-17 19:50:27 +00:00
LICENSE Initial commit 2022-12-11 15:30:49 +00:00
Logger.py Dateien hochladen nach „“ 2022-12-18 13:27:20 +00:00
Oled.py initial commit 2022-12-11 15:31:59 +00:00
README.md „README.md“ ändern 2022-12-17 21:57:13 +00:00
configs.py Dateien hochladen nach „“ 2022-12-18 07:44:52 +00:00
main.py Dateien hochladen nach „“ 2022-12-17 22:02:28 +00:00
secrets.py „secrets.py“ ändern 2022-12-18 13:27:51 +00:00

README.md

TCS2FHEM

If you have a TCS door intercom system and want to integrate it into your FHEM instance, this is a project for you. The goal of this project is to have a device, that connects the TCS intercom to FHEM. It should allow to trigger the dooropener and other functions (such as switching on the light) in FHEM. Also it should send events (like someone ringed the bell at the front door, or someone ringed the bell at the main door) to FHEM, so you can automate it (send notifications, interact...)

Hardware

  • Raspberry Pico W
  • Waveshare 2,23" OLED Display
  • 4-Button Keypad
  • 3D-printed Custom Case for Pico and Button Keypad and power circuit

Instructions/Setup

In the file configs.py set your configurations:
country: your countrycode (AT=Austria, DE=Germany...) (2-digit string)
ntp_host: set a ntp server (string url)
gmt_offset: offset to gmt for your timezone in hours (int)
auto_summertime: Enables changing to summertime (and back) automatically (True/False)
disable_wifi_powersavingmode: Wifi powersavingmode is enabled per default. Set to true to disable powersavingmode for Wifi (True/False)
api_port: Port on which the API is available (int)
displayoff: Minutes after last action, display goes off automatically (int)

In the file secrets.py set your configurations:
ssid: Wifi name (string)
pw: Wifi password (string)
api: API key (string)

Hint: use openssl rand -hex 20 to generate the api_key

Wiring of Display

OLED   =>    Pico  
VCC    ->    VSYS  
GND    ->    GND  
DIN    ->    11  
CLK    ->    10  
CS     ->    9  
DC     ->    8  
RST    ->    12  
SDA    ->    6  
SCL    ->    7   

Wiring of 4-Button Keypad

picture

Power circuit

The power circuit allows you to run the Pico W directly from the TCS bus system's power. It also connects the bus to the Pico to read and write from it. The circuit files for KiCad are stored in the kicad folder of this repo. You can order/print your own PCB with that files.
picture

Networking

Be sure that you give your Pico a static IP address on your router, so you know where the webservice is availabel and can set it up in FHEM.

FHEM API

todo