Smart Home RS232 WiFi Bridge Modul

Tasmota Dual RS232 seriell to WLan RS232 Sniffer Modul Bausatz serial to WiFi Module Kit Set inkl. Firmware

EI-OT ESP8266 dual RS232 WiFi Bridge Module © ei-ot ®

EI-OT ESP8266 Dual RS232 WiFi Bridge Module Kit © ei-ot ®

EI-OT ESP8266 Dual RS232 WiFi Bridge Module Assembling © ei-ot ®

EI-OT ESP8266 RS232 WiFi Bridge Module Dimensions © ei-ot ®

EI-OT ESP8266 RS232 WiFi Bridge Module ESP-01+ Tasmota Firmware © ei-ot ®

EI-OT ESP8266 RS232 WiFi Bridge Module connecting © ei-ot ®

EI-OT ESP8266 Dual RS232 WiFi Bridge Module Tasmota Firmware © ei-ot ®

EI-OT ESP8266 Dual RS232 WiFi Bridge Module Example © ei-ot ®

EI-OT ESP8266 RS232 WiFi Module Sniffer Mode Example © ei-ot ®

 

 

Der EI-OT RS232 WiFi Bridge Modul Bausatz in der neusten Version erlaubt die direkte WLan Anbindung von 2 Geräten die über eine RS232 Schnittstelle verfügen. Das dual RS232 verfügt nun über 2 RS232 Schnittstellen:

  1. RS232 Schnittstelle 1 mit DB-9 female Anschluss
  2. RS232 Schnittstelle 2 über Pinleiste (GND, TX2, RX2)
Basierend auf die 2 RS232 Schnittstellen kann das dual RS232 to WLan Modul als Sniffer Modul verwendet werden. Das Modul wird dabei direkt zwischen 2 RS232 basierenden Geräten geschaltet. Es bedarf lediglich einer entsprechenden Konfiguration sodass RS232 Signale zwischen den 2 RS232 Schnittstellen durchgereicht werden. Neben dem Sniffer Modus können beide RS232 auch unabhängig voneinander betrieben werden, sodass beispielsweise 2 Geräte mit RS232 Schnittstelle unabhängig voneinander betrieben werden.

Bedarf es eines direkten virtuellen COM Port, empfiehlt sich der kombinierte Einsatz mit dem USB TTL virtuellen COM Port WLan Modul.

Funktionsprinzip
Typische MCU's, so auch der ESP8266 unterstützen lediglich einen 3,3V UART Level, diesbezüglich wurde beim RS232 dual WiFi Bridge Modul die
  • GPIO1 und GPIO3 / UART Schnittstelle
  • GPIO4 und GPIO5
des ESP8266 um einen UT3232 IC von UTC erweitert.  In Kombination mit entsprechenden Kondensatoren UT3232 erreicht der UT3232 eine RS233 Levelumsetzung von ±13V auf das notwendige 3,3V Level des ESP8266 Levels. Mittels Tasmota Firmware werden
  • serielle Daten der RS232 Schnittstelle auf WLan umgesetzt
  • gleichermassen serielle Datenpakete die über WLan gesendet werden auf die RS232 Schnittstelle ausgegeben
Die RS232 Schnittstellen des dual RS232 WiFi Bridge Modul stellt dabei die typischen Parameter wie
  • Baudrate
  • Parität
  • Daten Bits
  • Stop Bits
einer RS232 Schnittstelle bereit.
  Das EI-OT dual RS232 WiFi Bridge Modul basiert auf dem ESP8266 ESP-01+. Der ESP8266 ESP-01+ verfügt über einen 32Mbit SPI Flash Speicher und erlaubt dank Tasmota Firmware eine einfache Integration in WLan Netzwerke. Bedingt durch den reduzierten Platzbedarf des ESP-01+, konnte die Hauptplatine des dual RS232 WiFi Bridge Modul entsprechend kompakt realisiert werden.  
Die Hauptplatine
des EI-OT dual RS232 ESP8266 WiFi Bridge Modul Bausatz verfügt bereits über grundlegende SMD Komponenten wie
  • 1 pcs. UT3232 RS232 SOP16 IC sowie Kondensatoren zur RS232 / UART Level Angleichung
  • 1 Stück AMS1117 3,3V Spannungskonverter sowie
  • 2 Stück Tantal Kondensatoren zur Glättung der Versorgungspannung
  • 1 Stück Status LED mit Vorwiderstand (GPIO2)
  • 1 Stück SMD Taster (GPIO0)
 
Dual RS232 WiFi Bridge Modul Bausatz Lieferumfang
Neben der Hauptplatine sind im EI-OT dual RS232 ESP8266 WiFi Bridge Modul Bausatz folgende Komponenten enthalten:
  • 1 Stück Stecksockel 2-reihig 5-polig zum Aufstecken des ESP-01+
  • 1 Stück RS232 SUB-D9 / DB-9 90° Anschlussbuchse (female)
  • 2 Stück Pinleiste 1-reihig 3-polig
  • 2 Stück Jumper
  • 1 Stück Pinleiste 1-reihig 7-polig gerade
  • 1 Stück Pinleiste 1-reihig 5-polig 90°
 

Dual RS232 WLan Bridge Modul basierend auf dem ESP-01+ bereits mit Tasmota geflasht

 
GPIO und weitere Anschlüsse
Auf der Hauptplatine des dual RS232 WLan Bridge Modul Bausatz wurden zusätzlich folgende Anschlüsse
  1. GPIO2 wurde über einen Vorwiderstand mit einer LED beschaltet um einen etwaigen Status anzuzeigen
  2. GPIO0 wurde über einen Taster auf GND beschaltet um bei Bedarf ein LOW Level Signal auf den GPIO0 auszugeben
  3. GPIO12 zur freien Verwendung
  4. GPIO16 zur freien Verwendung
 

Die Tasmota Firmware des dual RS232 ESP8266 WiFi Bridge Moduls wurde speziell auf die Übertragung von seriellen Daten optimiert und verfügt neben den erforderlichen Bibliotheken zusätzlich über

    • TCP Bridge Bibliothek um serielle Daten direkt über einen TCP Socket zu übertragen
    • Serial Bridge Bibliothek
 
   

The latest version of the EI-OT RS232 WiFi bridge module kit allows the direct WiFi connection of 2 devices that have an RS232 interface. The dual RS232 now has 2 RS232 interfaces:

  1. RS232 interface 1 with DB-9 female connection
  2. RS232 interface 2 via pin strip (GND, TX2, RX2)
Based on the 2 RS232 interfaces, the dual RS232 to WLan module can be used as a sniffer module. The module is switched directly between 2 RS232 based devices. All that is required is an appropriate configuration so that RS232 signals are passed through between the 2 RS232 interfaces. In addition to the sniffer mode, both RS232 can also be operated independently of each other, so that, for example, 2 devices with RS232 interfaces can be operated independently of each other. If a direct virtual COM port is required, combined use with the USB TTL virtual COM port WLan module is recommended.
Working Principle

Typical MCU's, also the ESP8266 supporting only 3,3V UART Level, therefore the ESP8266 Modul is connected to a UTC3232 Level Converter IC to support

  • GPIO1 and GPIO3 / UART Interface
  • GPIO4 and GPIO5

with serial data. In Combination with appropriate capacitors, the UT3232 converts a RS232 Level from ±13V to required 3.3V Level of EPS8266 serial level.

In Combination with the Tasmota Firmware

  • serial Data from RS232 Interface are converted to WiFi
  • serial Data send thru WiFi directly converted to RS232 Data
The RS232 Interface of the EI-OT dual RS232 WiFi Bridge Module supports all typical Parameter  such as
  • Baudrate
  • Parity
  • Data Bits
  • Stop Bits
of a serial Interface.
  The EI-OT dual RS232 WiFi Bridge Modul is based on the ESP8266 ESP-01+ Module. The ESP8266 ESP-01+ Modules got a 32Mbit Flash ROM, flashed with Tasmota Firmware for easy WiFi integration. Due ESP-01+ dimensions, the mainboard of the dual RS232 WiFi Bridge Modul has a small form factor.  
The PCB
of the EI-OT dual RS232 ESP8266 WiFi Bridge Module Kit comes assembled with basic SMD components such as
  • 1 pcs. UT3232 RS232 SOP16 IC in combination with required capacitors
  • 1 pcs. AMS1117 3.3V Voltage LDO Converter
  • 2  pcs. Tantalum Capacitors
  • 1 pcs. Status LED (GPIO2)
  • 1 pcs. SMD Key (GPIO0)
 
Dual RS232 WiFi Bridge Module Kit
besides the basic PCB the EI-OT dual RS232 ESP8266 Module Kit includes:
  • 1 pcs. 2-row 5-pin female socket for ESP-01+ Module
  • 1 pcs. RS232 SUB-D9 / DB-9 90° female socket connector
  • 2 pcs. Pinheader 1-row 3-pole
  • 2 pcs. Jumper
  • 1 pcs. Pinheader 1-row 7-pole
  • 1 pcs. Pinheader 1-row 5-pole 90°
 

Dual RS232 WiFi Bridge Module based on ESP-01+ Tasmota Firmware flashed

 
GPIO additionally Connections
The EI-OT RS232 WiFi Bridge Module Board features
  1. GPIO2 is connected to a LED with a resistor to enable visual status
  2. GPIO0 is connected to a SMD Button (connected to GND) to enable a LOW Level Signal to GPIO0
  3. GPIO12 for user selection
  4. GPIO16 for user selection
   

The Tasmota Firmware of the RS232 ESP8266 WiFi Bridge Module is optimized to transfer serial Data. Besides basic Libraries the Tasmota Firmware supports

    • TCP Bridge Library to transfer serial Data thru TCP Socket
    • Serial Bridge Library
 
EI-OT RS232 ESP8266 WiFi Bridge Module Features
VCC Spannungsversorgung DC 5-12 Volt VCC  / Input Voltage DC 5-12 Volt
Schnittstellen 2 x RS232
Baudrate 1200-250400
Parität
Stop Bits
Data Bits
Datenformat String, Binary, Hex
Interfaces 2 x RS232
Baudrate 1200-250400
Parität
Stop Bits
Data Bits
Dataformat String, Binary, Hex
Serial Delimiter / Escape Character Code ASCII decimal 1-127, 128 (32-127), disable
unterstütztes Datenformat String
Binary
Hex
supported Data Format String
Binary
Hex
Steuerzeichen Escape Character Code ASCII decimal 1-127
128 (32-127)
254 deaktiviert & post HEX String
255 deaktiviert
Serial Delimiter Escape Character Code ASCII decimal 1-127
128 (32-127)
254 deaktiviert & post HEX String
255 deaktiviert
serieller Puffer 256-520 serial Buffer 256-520
Protokolle (TCP Socket), HTTP, REST, MQTT, Domoticz, Home Assistant Protocols (TCP Socket), HTTP, REST, MQTT, Domoticz, Home Assistant
typische Anwendung Erfassung von seriellen RS232 basierenden Daten zur Einbindung in lokale WLan Netzwerke typical Application  Capture of serial RS232 Data Signals in local WiFi Networks
Leistung Strom Power Current
AMS1117  Ausgangsstrom 1,6A (typ.) / 1,8A (max.) AMS1117 Output Current 1,6A (typ.) / 1,8A (max.)
Stromverbrauch (ohne externe Module oder Sensoren) 80mA (durchschnittlich)

270mA (max.)

23mA (Modem Sleep)

5mA (Light Sleep)

<3mA (Deep Sleep)

Current Consumption (w/o external Sensors or Modules) 80mA (average)

270mA (max.)

23mA (Modem Sleep)

5mA (Light Sleep)

<3mA (Deep Sleep)

WLan 802.11 WiFi 802.11
Frequenzbereich 2412 – 2884 Mhz. Frequency Range 2412 – 2884 Mhz.
Sendeleistung 802.11b: 16±2 dBm (@11Mbps)
802.11g: 14±2 dBm (@54Mbps)
802.11n: 13±2 dBm (@HT20, MCS7)
Transmit Power 802.11b: 16±2 dBm (@11Mbps)
802.11g: 14±2 dBm (@54Mbps)
802.11n: 13±2 dBm (@HT20, MCS7
Empfangs – Empfindlichkeit CCK, 1 Mbps : -90dBm
CCK, 11 Mbps: -85dBm
6 Mbps (1/2 BPSK): -88dBm
54 Mbps (3/4 64-QAM): -70dBm
HT20, MCS7 (65 Mbps, 72.2 Mbps): -67dBm
Receiving Sensitivity CCK, 1 Mbps : -90dBm
CCK, 11 Mbps: -85dBm
6 Mbps (1/2 BPSK): -88dBm
54 Mbps (3/4 64-QAM): -70dBm
HT20, MCS7 (65 Mbps, 72.2 Mbps): -67dBm
Sicherheit WEP/WPA-PSK/WPA2-PSK Security WEP/WPA-PSK/WPA2-PSK
Antenne 2,5dBi PCB Antenne integriert Antenna 2.5dBi integrated PCB Antenna
IPv4 Unterstützung DHCP und statisch IPv4 Support DHCP and static
Anschlüsse Connections
Pinleiste 5-polig 90° Spannungsversorgung (5-12V / GND) Pin Header 5-pin 90° Power Supply (5-12V / GND)
2 x Pinleiste 3-polig DB-9 RS232 Jumper Brücke für Pin 2 und Pin 3 (RX / TX) 2 x Pin Header 3-pin DB-9 RS232 Jumper to connect Pin 2 and Pin 3 (RX / TX)
Pinleiste 7-polig GND
RX2
TX2
RST
IO0
IO12
IO16
Pin Header 7-pin  GND
RX2
TX2
RST
IO0
IO12
IO16
RS232 SUB-D9 DB-9 Anschlussbuchse RS232 Anschluss (Buchse / female) RS232 SUB-D9 DB-9 connector RS232 Connector female
Tasmota Firmware Tasmota Firmware
 Konfiguration  grafische Benutzeroberfläche über Browser http://192.168.4.1 Configuration   over Webinterface thru Browser http://192.168.4.1
unterstützte Schnittstellen RS232 auf UART
GPIO
supported Interface RS232 to UART
GPIO
EI-OT dual RS232 WiFi Bridge Module Board assembling
EI-OT dual RS232 Modul bestücken

Das EI-OT dual RS232 WLan Bridge Modul ist bereits mit SMD Komponenten wie

  • AMS1117 3,3V Spannungskonverter nebst Kondensatoren
  • Widerständen
  • UT3232 RS232 UART Konverter sowie Kondensatoren
  • Taster zur Benutzereingabe
  • Status LED
bestückt.

Zur Inbetriebnahme müssen lediglich, nachfolgende Komponenten wie in nebenstehender Grafik dargestellt bestückt / verlötet werden.

Die Bestückung des dual RS232 WLan Bridge Moduls Schritt für Schritt:
  1. Platziere den 2x5 Pin Stecksockel auf ESP-01+ und verlöte die Pins auf der Rückseite
  2. Platziere die 2 x 3-poligen Pinleisten (schwarz) auf PH1
  3. Platziere die 7-polige Pinleiste (grün) auf H2 und verlöte die Pins auf der Rückseite
  4. Platziere die 5-polige gewinkelt Pinleiste und verlöte die Pins auf der Rückseite
  5. Platziere die DB9 Anschlussbuchse auf DB9 Female und verlöte die Pins auf der Rückseite
Das EI-OT dual RS232 WLan Bridge Modul ist fertig bestückt.
EI-OT dual RS232 Module assembling

The EI-OT dual RS232 WiFi Bridge Module is already equipped with SMD components such as

  • AMS1117 3.3V Voltage Converter and capacitors
  • Resistors
  • UT3232 RS232 UART Converter
  • User Button
  • Status LED
For completion, the following components simply need to be assembled. The assembly of the EI-OT dual RS232 WiFi Bridge Module step by step:
  1. Place the 2x5 pin socket on top side and solder the pins on the bottom side
  2. Place the 2 x 3-pin header (black) on PH1 and solder the pins on the bottom side
  3. Place the 7-pin  header (green) on H2 and solder the pins on the bottom side
  4. Place the 90° 5-pin  90° Pin Header  on top side  and solder the pins on the bottom side
The basic assembling of the EI-OT dual RS232 WiFi Bridge Module is finished.
EI-OT ESP-01+ ESP8266 RS232 Module Jumper Setting
Jumper setzen

Nach entsprechender Bestückung verfügt das Modul über eine DB9 (female) Anschlussbuchse. Dementsprechend sind die Pins des DB9 Anschluss wie folgt belegt:

  • Pin2 = TX
  • Pin3 = RX
  • Pin5 = GND

Dementsprechend müssen die RS232 Signale zu 3232 Level Shifter IC mittels Jumper gemäß nebenstehender Grafik gesetzt werden.

An dieser Stelle sei erwähnt (leider ein sehr häufiger Fehler) der einfache Wechsel durch Kreuzen der Pin's auf einen DB Stecker funktioniert nicht! Im Detail wird hierzu der Pin4 des DB9 benötigt, dieser ist nicht belegt. Rein theoretisch könnte man aber einen DB9 Male Anschluss auf der Unterseite der Platine platzieren.
Jumper setting
After appropriate assembly, the module has a DB9 (female) connection socket. Accordingly, the pins of the DB9 connection are assigned as follows:
  • Pin2 = TX
  • Pin3 = RX
  • Pin5 = GND
Accordingly, the RS232 signals must be set to the 3232 level shifter IC using jumpers according to the graphic. At this point it should be mentioned (unfortunately a very common mistake) simply switching to a DB connector by crossing the pins does not work! In detail, pin 4 of DB9 is required for this; it is not assigned. In theory, you could place a DB9 male connection on the underside of the board.
EI-OT dual RS232 Module connection
Spannungsversorgung

Die zentrale Spannungsversorgung erfolgt über die Pins

  • Pin 5V zum Anschluss von 5V+ bis 12V+
  • Pin GND zum Anschluss von 5V- bis 12V-
Anschluss RS232 - 2

Der zweite RS232 Anschluss erfolgt über die 7-polige Pinleiste

  • Pin GND zum Anschluss von GND
  • Pin RX2 zum Anschluss vom RX Signal
  • Pin TX2 zum Anschluss vom TX Signal
der RS232 Schnittstelle
Power Supply
The central voltage supply is provided by
  • Pin 5V to connect VCC from 5V to 12V
  • Pin GND to connect GND from power supply
Power Supply
The second RS232 interface is provided by Pin Header
  • Pin GND to connect GND
  • Pin RX2 to connect RX
  • Pin TX2 to connect TX
to RS232 Interface
EI-OT dual RS232 Module attach ESP-01+ ESP8266 Module
ESP-01+ Modul aufstecken

Nachdem die benötigten Anschlüsse hergestellt wurden, muß lediglich das ESP-01+ Modul auf den Stecksockel aufgesteckt werden.

attach ESP-01+ Module
After the required connections have been made, the ESP-01+ module simply needs to be plugged into the socket.
Tasmota WLan WiFi Configuration
Tasmota WLan Konfiguration

Die Tasmota Firmware erlaubt eine einfache WLan Konfiguration mittels Webinterface. An dieser Stelle sei erwähnt, die Tasmota Firmware unterstützt den SoftAP Modus (Access Point) lediglich zur WLan Konfiguration. Sobald das jeweilige Modul als Client in einem bestehenden Netzwerk eingebunden wurde, wird der SoftAP Modus nicht mehr unterstützt.

Tasmota Client Anbindung mittels Webinterface

Nachdem das jeweilige Modul mit Spannung versorgt wurde startet das Modul im SoftAP Modus. Innerhalb der Netzwerkumgebung eines

  • Computers
  • Mobiltelefon
  • Tablet
erscheint nun ein neuer Tasmota SoftAP / Access Point.

Die WLan Konfiguration mittels dem Tasmota Webinterface erfolgt mittels 5 einfachen Schritten:

  1. Stelle eine WLan Verbindung über Systemeinstellungen / Netzwerkeinstellungen zu dem Tasmota Soft AP wird als tasmota-??????-???? Access Point angezeigt. Der Tasmota SoftAP verfügt über keine Sicherheitseinstellungen, es wird kein Passwort benötigt.
  2. Nachdem eine WLan Verbindung hergestellt wurde öffnet sich üblicherweise das Tasmota Webinterface innerhalb des festgelegten Standardbrowsers. Alternativ kann das Tasmota Webinterface durch Aufruft der url http://192.168.4.1 innerhalb eines Webbrowsers aufgerufen werden. Tasmota führt eigenständig einen Netzwerkscan aus und gibt die Liste verfügbarer Netzwerke aus. Sollte das gewünschte Netzwerk nicht im Tasmota Webinterinterface nicht aufgelistet sein, Scan for all WiFi Networks anklicken, sodass erneut ein Netzwerkscan durchgeführt wird.
  3. Wähle das jeweilige Netzwerk aus (anklicken), Tasmota übernimmt dann das jeweilige Netzwerk in das Textfeld WiFi Network. Ergänze nun die erforderlichen Parameter durch das Netzwerk Passwort und klicke auf den Button Save.
  4. Das Tasmota Modul startet eigenständig und versucht eine Verbindung mit dem zuvor festgelegtem Netzwerk herzustellen (Dauer ca. 20-30 Sekunden).
  5. Wurde die Verbindung erfolgreich hergestellt erscheint die Meldung Successful WiFi Connection sowie die Angabe der vom Router mittels DHCP zugewiesenen IP Adresse.
    1. Wichtig das Tasmota Modul ist nun nur noch über dieses IP Adresse erreichbar.
    2. Bitte WLan Verbindung überprüfen, ob sich der Client im gleichen Netzwerk wie das Tasmota Modul befindet (gegebenenfalls mit dem entsprechenden WLan Netzwerk verbinden) , da sonst kein Redirect erfolgen kann.
  6. Das Tasmota Modul ist nun als WLan Client unter der zuvor (unter 5.) ausgegebenen IP Adresse erreichbar.

 

Behebung etwaiger Probleme

Sollte man die IP Adresse vergessen haben, kann diese üblicherweise im Webinterface des Routers unter Netzwerk oder WLan gefunden werden.

Bei falschen WLan / Netzwerk Parametern, z.B. falschem Passwort wird die Verbindung seitens des Routers abgewiesen. Dementsprechend muss das Tasmota Modul mittels Factory Default Reset wie folgt zurückgesetzt werden
  • das Modul 6 mal für 1-2 Sekunden mit Spannung versorgen, beim 7 mal die Spannungsversorgung bestehen lassen, das Tasmota Modul startet dann eigenständig im SoftAP Modus, sodass erneut wie oben beschrieben die Konfiguration durchgeführt werden kann. Bitte beachten bei Steckernetzteilen bleibt die Spannungsversorgung oftmals über mehrer Sekunden bestehen, d.h. die Pausen zwischen der erneuten Spannungsversorgung sollten einige Sekunden (5-10 Sekunden) betragen.
Tasmota WiFi Configuration

The Tasmota firmware allows simple WiFi configuration thru Browser web interface. At this point it should be mentioned that the Tasmota firmware only supports SoftAP mode (access point) for WiFi configuration. As soon as a Tasmota module has been integrated as a WiFi client in an existing network, SoftAP mode is disabled.

Tasmota WiFi Client Setup
After Tasmota module has been supplied with voltage, the module starts as Tasmota SoftAP. Within network environment of
  • Computer
  • Mobile phone
  • Tablet
a new Tasmota SoftAP / Access Point appears. The WiFi configuration using the Tasmota web interface in 5 simple steps:
  1. Establish a WiFi connection via system settings / network settings to the Tasmota Soft AP, appears as tasmota-??????-???? access point. The Tasmota SoftAP has no security settings, so no password is required.
  2. After a WiFi connection has been established, the Tasmota web interface usually opens within the specified standard browser. Alternatively, the Tasmota web interface can be accessed by accessing the url http://192.168.4.1 within a web browser. Tasmota independently runs a network scan and outputs the list of available networks. If the desired network is not listed click on Scan for all WiFi Networks so that a network scan is carried out again.
  3. Select the respective WiFi network (click), Tasmota will then add the respective network to the WiFi Network text field. Now add the network password to the required parameters and click on the Save button.
  4. The Tasmota module starts independently and tries to establish a connection to the previously defined network (duration approx. 20-30 seconds).
  5. If the connection has been established successfully, the message Successful WiFi Connection appears as well as the IP address of the Tasmota Module assigned by the router using DHCP.
    1. Important: the Tasmota module can now only be reached via this IP address.
    2. Please make sure the WiFi connection to  your client is in the same network as the Tasmota module. If necessary, connect to the corresponding WiFi network, otherwise no redirect can proceeded.
  6. The Tasmota module can now be reached as a WiFi client thru the IP address previously issued (under 5.).

 

Troubleshooting

In case of IP address was lost it can usually be found in the router's web interface under Network or WiFi.

In case of WiFi / network parameters are incorrect, e.g. an incorrect SSID Name or password, the connection will be rejected by the router. Accordingly, the Tasmota module must be reset using a factory default reset as follows
  • Supply the module with power 6 times for 1-2 seconds. On seventh time, leave the power supply on. The Tasmota module then starts independently in SoftAP mode so that the configuration can be carried out again as described above. Please note that with plug-in power supplies, the voltage supply often remains for several seconds, i.e. the breaks between the renewed voltage supply should be a few seconds (5-10 seconds).
EI-OT ESP8266 RS232 RX TX serial Bridge Configuration
Tasmota  Konfiguration
Nachdem die  WLan Konfiguration durchgeführt wurde, kann das dual RS232 Modul innerhalb Tasmota wie folgt konfiguriert werden:
  1. klicke auf Configuration um das Tasmota Konfigurationsmenü zu öffnen
  2. klicke im Tasmota Konfigurationsmenü auf Configure Module
  3. wähle im jeweiligen   GPIO1 Serial TX GPIO3 Serial RX GPIO4 SerialBR TX GPIO5 SerialBR RX  aus und klicke auf Save Tasmota speichert die Konfiguration und führt einen Neustart des EI-OT dual RS232 Moduls aus
  4. Nach erfolgreichem Neustart aktualisiert ESP-OS die Benutzeroberfläche, klicke dort auf Tools um in die Tasmota Tools zu wechseln
  5. Klicke im Tasmota Tools Menü auf Console
  6. Innerhalb der Tasmota Konsole werden nun sämtliche RS232 Daten ausgegeben.
Tasmota Configuration
After the WiFi configuration is finished, the dual RS232 WiFi Bridge Module must be configured as follows:
  1. click on Configuration
  2. in the Tasmota Configuration Menu click on Configure Module
  3. in Module parameters select for each GPIO Parameters thru Drop Down as follow GPIO1 SerBr TX GPIO3 SerBr RX GPIO4 SerialBR TX GPIO5 SerialBR RX and click on Save soon as Parameters saved, Tasmota initiate a reboot
  4. after reboot Tasmota reloads the Webinterface, click on Tools to Enter Tasmota Tools Menu
  5. in Tasmota Tools Menu click on console
  6. All RS232 data is now output within the Tasmota console.
RS232 over TCP thru WiFi USB/TTL serial Bridge
RS232 COM Schnittstelle
Die RS232 Schnittstelle hat ihren Ursprung in den 1960er Jahren und wird mittlerweile häufig durch den Universal Serial Bus ersetzt. Dementsprechend verfügen viele PC's und auch Notebooks über keine physische RS232 Schnittstelle mehr, eine serielle Datenübertragung erfolgt meist über USB (Universal Serial Bus). Bei MAC's ist generell keine RS232 / COM Schnittstelle mehr verfügbar. Da RS232 aber häufig zur Anbindung von Endgeräten Anwendung findet, bedarf es meist entsprechender RS232 / USB Konverter. Vorteil dieser kabelgebundenen RS232 Verbindung ist die Herstellung eines "physischen", im Detail virtuellen COM Port. Der virtuelle COM Port wird dabei direkt in dem jeweiligen Betriebssystem bereitgestellt, bzw. kann direkt in einer Software angesprochen werden. Neben der kabelgebundenen RS232 Anbindung kann gleichermassen ein virtueller COM Port über WLan realisiert werden. Im nachfolgenden Tutorial wird mittels
  • einem ESP8266 USB WiFi Bridge Modul, serielle Datenpakete einer USB Schnittstelle auf WLan umgesetzt
  • einem EI-OT Dual  RS232 WiFi Bridge Modul, RS232 Signale auf WLan umgesetzt
Das USB WiFi Bridge Modul erfüllt dabei die Funktion eines virtuellen COM Port am Host und erfüllt sämtliche Rahmenbedingungen eines typischen RS232 Anschluss. Die grundlegenden Parameter einer WLan gebundenen COM Schnittstelle unterscheiden sich nicht im Vergleich zu einer kabelgebundenen RS232 Schnittstelle
  • serielles Protokoll
  • Baudrate
  • Steuerzeichen
Die seriellen Daten werden lediglich auf WLan umgesetzt und über TCP transferiert. Im Vorfeld muss zunächst die Basiskonfiguration des
  • USB WiFi Bridge Modul
durchgeführt werden. Ferner muß nun noch die TCP UART Bridge am
  • USB WiFi Bridge Moduls
aktiviert (GPIO1 als TCP Tx und GPIO3 als TCP Rx konfiguriert) werden. Der Host Rechner verfügt nun über einen empfangsbereiten virtuellen COM Port.
RS232 COM Interface
The RS232 COM Interface is a standard originally introduced in 1960 for serial communication transmission of data. Meanwhile most Computers are based on other serial Interface such as USB (Universal Serial Bus). Because of RS232 Standard often RS232 is used to connect Devices to Computers thru RS232 / USB Converter. Advantage of a wired RS232 connection is a "physical", in Detail virtual COM Port. The virtual COM Port is directly available thru Operating System and is available in Software Applications. Besides the wired RS232 Connection, a virtual COM Port can be realized thru WiFi. In our tutorial we describe a RS232 Connection thru WiFi and a virtual COM Port
  • the ESP8266 USB WiFi Bridge transfer serial Data from USB  to WiFi
  • the EI-OT Dual RS232 WiFi Bridge Module transfer serial Data thru WiFi
The USB WiFi Bridge Module enables full virtual COM Port functionality. The basic of serial Data transfer is based on same parameters such as regular / wired RS232 / COM Port serial connection.
  • serial protocol
  • baudrate
  • Control Character
The serial Data are just transferred thru TCP over WiFi. First step  Module Basic Configuration
  • USB WiFi Bridge Modul
After Basic Configuration of USB WiFi Bridge Module is finished TCP serial Bridge Mode of
  • USB WiFi Bridge Moduls
must be enabled (set GPIO1 to TCP Tx and GPIO3 to TCP Rx). The host computer now has a virtual COM port ready to receive.
Tasmota TCP COM Port Configuration
Tasmota Konfigurieren
Nun muss das EI-OT Dual RS232 Modul noch entsprechend mittels der Tasmota Weboberfläche konfiguriert werden, sodass RS232 Signale direkt auf TCP umgesetzt werden. In diesem Beispiel wird die zweite RS232 Schnittstelle des EI-OT dual RS232 Moduls, also GPIO4 und GPIO5 verwendet und entsprechend innerhalb der Tasmota Firmware wie folgt konfiguriert:
  1. klicke im Tasmota Webinterface auf Configuration
  2. klicke im Tasmota Modul Configuration Menü auf Configure Module
  3. setze GPIO4 auf TCP TX und GPIO5 auf TCP RX und klicke auf Save
  4. Tasmota führt einen Neustart des Moduls durch, alsbald das Tasmota Webinterface erscheint klicke auf Tools
  5. klicke im Tools Menü auf Console
  6. die Tasmota Console erscheint, schließe die TCP Konfiguration wie nach folgend beschrieben durch Konsolenbefehle ab.
Tasmota Configuration
Now the EI-OT Dual RS232 module must be configured accordingly using the Tasmota web interface so that RS232 signals are converted directly to TCP. In this example, the second RS232 interface of the EI-OT dual RS232 module, i.e. GPIO4 and GPIO5, is used and configured accordingly within the Tasmota firmware as follows:
  1. click on Configuration in the Tasmota web interface
  2. click on Configure Module in the Tasmota Module Configuration menu
  3. set GPIO4 to TCP TX and GPIO5 to TCP RX and click Save
  4. Tasmota will restart the module, as soon as the Tasmota web interface appears click on Tools
  5. click Console in the Tools menu
  6. The Tasmota Console appears, complete the TCP configuration using console commands as described below.
RS232 Tasmota serial TCP COM Port Configuration
TCP COM Port Konfigurieren
Im Eigentlichen ist die Anbindung einer virtuellen COM Schnittstelle über WLan und Tasmota TCP Socket einer typischen COM Port Anbindung gleichzusetzen. Im Detail Bedarf es dabei der typischen Konfiguration der seriellen Schnittstelle die mittels Konsole und Kommandozeilen Eingabe wie folgt konfiguriert wird
  1. Baudrate beider Module, ist typischerweise die Baudrate des Endgerätes welches mittels RS232 Modul verbunden ist. In unserem Beispiel wird eine Baudrate von 115200 durch Eingabe von TCPBaudrate 115200 in die Kommandozeile und Drücken der Taste ENTER gesetzt. Der Parameter Baudrate muss in beiden Modulen konfiguriert und identisch sein.
  2. serielles Protokoll, ist typischerweise entsprechend dem über das RS232 Modul angeschlossene Endgerät, in unserem Beispiel Daten Bits 8 Parität None / keine Stop Bits 1 und wird durch Eingabe von TCPConfig 8N1 in die Kommandozeile und drücken der Taste ENTER gesetzt. Auch hier muss das serielle Protokoll gleichlautend bei beiden Modulen sein
  3. die Aktivierung des TCP Socket erfolgt hier im Beispiel über den Port 8080 und wird durch Eingabe von TCPStart 8080 in die Kommandozeile beider Module und drücken der Taste ENTER konfiguriert
  4. abschliessend muss nun eine TCP Socket Verbindung zwischen beiden Modulen hergestellt werden, im gezeigten Beispiel erfolgt die Anbindung vom EI-OT dual RS232 Modul mit der IP 192.168.178.115 zum USB WiFi Bridge Modul mit der IP Adresse 192.168.178.71. Die TCP Socket Verbindung wird hergestellt durch Eingabe von TCPConnect 8080, 192.168.178.71 in die Kommandozeile des RS232 Moduls und durch drücken der Taste ENTER.
Sobald die Verbindung erfolgreich hergestellt wurde, gibt die Konsole des USB WiFi Bridge Moduls Got connection from 192.168.178.71 aus.
TCP COM Port COnfiguration
Compared to a regular COM Port connection  there is no big difference to a Tasmota TCP Socket based COM Port connection. It requires also typical COM Port / Interface Parameter configuration such as
  1. Baudrate of both Modules, normally Baudrate its based on RS232 Module connected Device. In our example we use a Baudrate of 115200 and its set thru Command Line Input TCPBaudrate 115200 followed by pressing ENTER Key. Baudrate must be configured on RS232 and USB WiFi Bridge Module, the Baudrate must be identical.
  2. serial Protocol, is also based on RS232 Module connected Device, in our Example Data Bits 8 Parity None Stop Bits 1 and is configured thru Command Line Input TCPConfig 8N1 and pressing ENTER Key. Serial Protocol must be identical and also set on both Modules
  3. the serial Data are send thru TCP Socket, in our Example we use  Port 8080. The TCP Socket is enabled thru  TCPStart 8080 Command Line Input and set thru pressing ENTER Key
  4. now a TCP Socket connection must be activated to connect  RS232 Module (IP 192.168.178.75) to USB WiFi Bridge Module (IP 192.168.178.115). The TCP Socket connection is established thru  TCPConnect 8080, 192.168.178.71 Command Line input and pressing ENTER Key.
Soon as TCP Socket connection is active, in USB WiFi Bridge Console the message Got connection from 192.168.178.71 appears.
Tasmota ESP8266 UART RX TX standard communication
serieller Befehlssatz
Zusammenfassend läßt sich die Tasmota Befehlssatz zur seriellen Kommunikation über die UART Schnittstelle eines ESP8266 sowie ESP32 von jedem typischen seriellen Terminal Programm ableiten. Grundlegend basieren die folgenden Parameter auf typische serielle Schnittstellen. Ganz gleich ob es sich bei der Hardware um ein
  • EI-OT RS232 WLan Bridge Modul
  • EI-OT RS485 WLan Bridge Modul
  • typisches ESP Modul mit UART Schnittstelle
handelt, die nachfolgende Dokumentation bezieht sich stets auf die Tasmota UART Schnittstelle. Vorab dieser Befehlssatz bezieht sich nicht auf die serielle Hardware Bridge, sondern auf die TCP serial Bridge und serielle Standard Schnittstelle.
  • Zunächst muss mittels folgendem Befehlssatz die serielle UART Schnittstelle gemäß dem angeschlossenen Endgerät konfiguriert werden. Baudrate, fragt die aktuell konfigurierte Baudrate ab, bzw. durch den Befehl Baudrate gefolgt von der Baudrate wird die Baudrate entsprechend konfiguriert, Beispiel
Baudrate 115200
setzt die Baudrate auf 115200 SerialBuffer, fragt den aktuellen seriellen Buffer / Speicher ab, bzw. setzt den aktuellen Speicher durch Eingabe des jeweiligen Parameters (von 256 bis 520), Beispiel
SerialBuffer 520
setzte den Speicher auf 520 Byte. SerialConfig, fragt das aktuelle serielle Protokoll (Datenbits, Parität, Stopbits) ab, bzw. konfiguriert das serielle Protokoll. beispielsweise
SerialConfig 8N1
setzt das serielle Protokoll auf Datenbits 8 Parität None (Keine) Stopbits 1 SerialDelimiter, fragt den ASCII Dezimal Code des aktuell festgelegte Steuerzeichens ab, bzw. konfiguriert das Steuerzeichen durch anhängen des jeweiligen Dezimal ASCII Code, beispielsweise
SerialDelimiter 13
setzt CR (Carriage Return) als Steuerzeichen. Das jeweilige Steuerzeichen wird dabei gemäß ASCII Dezimal Zeichensatz interpretiert. Neben der expliziten Zuweisung des Steuerzeichens (von 0-127) kann zusätzlich 128, erlaubt lediglich ASCII Zeichen vom Dezimalwert 32 bis 127 254, deaktiviert sowohl das Steuerzeichen, als auch eine voran gestellten Hex String 255, deaktiviert das Steuerzeichen (es wird 1:1 übertragen)
serielle Kommunikation
Die serielle Kommunikation erfolgt über die Tasmota Konsole. Serielle Datenpakete werden dabei mittels SerialSend übertragen und mittels SerialReceived in der Console ausgegeben. Zur richtigen Interpretation der seriellen Daten werden 6 Optionen zur Übertragung bzw. Interpretation der seriellen Daten bereitgestellt. Mit einfachen Worten, die empfangenen werden stets im Datenformat der zuvor gesendeten Datenart interpretiert / in der Konsole ausgegeben.
  1. SerialSend1, sendet die angehängten Daten als String und hängt ein \n new line Element an
  2. SerialSend2, sendet die angehängten Daten 1 zu 1
  3. SerialSend3, sendet die angehängten Daten als String und ersetzt das Steuerzeichen
  4. SerialSend4, sendet die angehängten Daten als binäres Datenpaket, etwaige zu empfangende Daten werden als binary String interpretiert
  5. SerialSend5, sendet die angehängten Daten als Hex Datenpaket, etwaige zu empfangende Daten werden als Hex String interpretiert
  6. SerialSend6, sendet Dezimalzahlen wobei die Dezimalstelle durch ein Komma unterteil wird
Als einfaches Beispiel, wird mittels Tasmota Konsole SerialSend1 now I send a String in die Kommandozeile eingeben und durch drücken der Taste Enter gesendet, wird die Antwort als String interpretiert.
serial instruction set
In summary, the Tasmota command set for serial communication via the UART interface of an ESP8266 and ESP32 can be derived from any typical serial terminal program. Basically, the following parameters are based on typical serial interfaces. Regardless of whether the hardware is a
  • EI-OT RS232 WLan Bridge Module
  • EI-OT RS485 WLan Bridge Module
  • typical ESP module with UART interface
the following documentation always refers to the Tasmota UART interface. This instruction set will not work for serial RX TX Hardware Bridge, only for TCP serial Bridge and serial standard Interface. The serial RS232 Communication requires Parameters based on connected Device. To set required serial Interface Parameters use following instruction set Baudrate, queries actual Baudrate,  Baudrate in combination with a sets the Baudrate, for example
Baudrate 115200
sets Baudrate to 11520 SerialBuffer, queries actual Buffer Size, SerialBuffer in combination with a Buffer Size (from 256 up to 520) sets the Buffer Size, for example
SerialBuffer 520
configures Buffer Size to 520 Byte. SerialConfig, queries actual serial Protocol (Data bits, Parity, Stop bits) in combination with valid 3 parameters for example
SerialConfig 8N1
configures serial protocol to Data bits 8 Parity None Stop bits 1 SerialDelimiter, queries actual Serial Delimiter ASCII Decimal Code in combination with a valid ASCII Decimal Code is set to new Serial Delemitter, for example
SerialDelimiter 13
enables CR (Carriage Return) as Serial Delimiter. Beside a ASCII Decimal Value (0-127) following are valid 128, only allow ASCII characters 32 to 127 in response text 254, disable serial delimiter and post HEX string 255, disable serial delimiter
serial Communication
For direct communication use Command Line of Tasmota Console. The serial Data are send thru serial command SerialSend and incoming datas are shown as SerialReceived. For correct serial data interpretation are 6 options available. In simple Words, received Data are always interpreted in same format as serial data was previously send.
  1. SerialSend1, send appending \n (newline) ()
  2. SerialSend2, send
  3. SerialSend3, replace escape characters and send
  4. SerialSend4, ssend as binary data. Data in serial response messages is encoded as binary strings
  5. SerialSend5, send as hex. Data in serial response messages is encoded as hex strings
  6. SerialSend6, send as comma-delimited string of decimal numbers
A simple Example, if SerialSend1 now I send a String was send thru Tasmota Konsole Command Line, answer will be interpreted as String.
EI-OT RS232 Module dual mode connection
Tasmota RS232 Anschluß

Insofern keine GPIO Konfiguration festgelegt wurde, wird innerhalb der Tasmota Firmware GPIO1 als UART TX und GPIO3 als UART RX definiert. Im nachfolgenden Beispiel wird zusätzlich GPIO4 als serBr TX und GPIO5 als serBr RX (zweite RS232 Schnittstelle mittels Tasmota Hardware Bridge) verwendet.

Als Hardware werden 2 echte CP2102 RS232 Level Konverter verwendet, sollten beispielsweise USB/TTL Konverter verwendet werden erfolgt zwar eine Kommunikation, jedoch erscheinen unleserliche Zeichen im seriellen Terminal (da das EI-OT RS232 Modul echten RS232 Level liefert).

Ferner wird ein entsprechender serial Terminal benötigt, im nachfolgenden Beispiel Roger Meier's Freeware CoolTerm.
Tasmota RS232 Connection
If no GPIO configuration has been specified, GPIO1 is defined as UART TX and GPIO3 as UART RX within the Tasmota firmware. In the example below, GPIO4 is also used as serBr TX and GPIO5 as serBr RX (second RS232 interface using Tasmota Hardware Bridge). Two real CP2102 RS232 level converters are used as hardware. If, for example, USB/TTL converters are used, communication takes place, but illegible characters appear in the serial terminal (since the EI-OT RS232 module delivers real RS232 level).
Tasmota RS232 Module dual mode example
Tasmota RS232 Beispiel

Nachdem wie oben benannt

  • eine entsprechende RS232 Verbindung hergestellt wurde
  • ein serieller Terminal auf vorgenannte RS232 Verbindungen mit einer baudrate von 115200 b/s (8n1) zugreift
kann wie nachfolgend beschrieben direkt über Tasmota auf RS232 kommuniziert werden
  1. gebe in die Tasmota Kommandozeile SerialSend1 gefolgt von einem String ein Drücke die Enter Taste
  2. der String wird direkt über UART auf die RS232 Schnittstelle ausgegeben und erscheint im seriellen Terminal der ersten RS232 Schnittstelle
  3. gibt man nun einen String im seriellen Terminal ein und sendet über die RS232 Schnittstelle, so erscheint in der Tasmota Console SerialReceived gefolgt von dem gesendet String
  4. gleichermassen kann über die zweite RS232 Schnittstelle über die Tasmota Console gesendet werden. Hierbei gilt zu beachten das der Tasmota Befehl nun SSerialSend1 lautet gefolgt von dem zu sendenden String,
  5. beim Drücken der Taste ENTER wird der String direkt über die zweite (diesmal GPIO4 und GPIO5) RS232 Schnittstelle übertragen und erscheint im seriellen Terminal der zweiten RS232 Schnittstelle
  6. sendet man nun einen String vom seriellen Terminal, so erscheint dieser in der Tasmota Console SSerialReceived gefolgt von dem jeweiligen String.

Tasmota RS232 Example
After as named above
  • a corresponding RS232 connection has been established
  • A serial terminal accesses the  RS232 connections with a baud rate of 115200 b/s (8n1).
can be communicated directly via Tasmota thru RS232 as described below
  1. Enter SerialSend1 followed by a string in the Tasmota command line Press the Enter key
  2. The string is output directly via UART to the RS232 interface and appears in the serial terminal of the first RS232 interface
  3. If you now enter a string in the serial terminal and send via the RS232 interface, SerialReceived appears in the Tasmota Console followed by the sent string
  4. Likewise, it can be sent via the Tasmota Console via the second RS232 interface. Please note that the Tasmota command is now SSerialSend1 followed by the string to be sent,
  5. When you press the ENTER key, the string is transmitted directly via the second (this time GPIO4 and GPIO5) RS232 interface and appears in the serial terminal of the second RS232 interface
  6. If you now send a string from the serial terminal, it will appear in the Tasmota Console SSerialReceived followed by the respective string.
RS232 dual Module Sniffer Bridge Mode
RS232 Sniffer Modus
Sniffer zu Deutsch Schnüffler Modus beschreibt im Eigentlichen bereits den Sniffer Modus. Seit mittlerweile über 20 Jahren hat der USB (Universal Serial Bus) die typische serielle Anbindung mittels RS232 am typischen Computer weitestgehend abgelöst. Dementsprechend kann die Anbindung eines Gerätes mit RS232 Schnittstelle eine gewisse Herausforderung darstellen. Oftmals wird zu günstigen USB TTL Konvertern gegriffen um ein RS232 Signal auf eine USB Schnittstelle umzusetzen. Insofern das Endgerät seine RS232 Schnittstelle mit 5V Level betreibt (sehr unwahrscheinlich / dann wäre es keine RS232 Schnittstelle) kann das sogar funktionieren. Da das EI-OT dual RS232 Modul jedwede Signale auf WLan umsetzt ist die Anbindung an jedweden Computer, oder sonstiges Endgerät mit WLan Schnittstelle möglich. Was aber wenn die RS232 Schnittstelle von 2 Endgeräten genutzt wird, mit einfachen Worten wenn 2 Geräte über eine RS232 Schnittstelle kommunizieren. Hier kommt typischerweise ein Sniffer zum Einsatz, dabei werden sämtliche Daten an beide RS232 Teilnehmer / Geräte durchgereicht und sämtliche Daten protokolliert, im Detail auf ein weiteres Protokoll übersetzt.
RS232 COM Interface
For over 20 years now, the USB (Universal Serial Bus) has largely replaced the typical serial connection using RS232 on the typical computer. Accordingly, connecting a device with an RS232 interface can be a certain challenge. Cheap USB TTL converters are often used to convert an RS232 signal to a USB interface. To the extent that the end device operates its RS232 interface with a 5V level (very unlikely / then it would not be an RS232 interface) it can even work. Since the EI-OT dual RS232 module converts any signals to WiFi, it can be connected to any computer or other device with a WiFi interface. But what if the RS232 interface is used by 2 end devices, in simple words if 2 devices communicate via one RS232 interface. A sniffer is typically used here, all data is passed on to both RS232 participants/devices and all data is logged and translated in detail into another protocol.
RS232 serial Sniffer Mode Configuration
RS232 Sniffer Konfigurieren
Zwar verfügt das EI-OT dual RS232 Modul über 2 RS232 Schnittstellen, jedoch funktionieren beide Schnittstellen unabhängig voneinander. Die Grundlage für einen RS232 Sniffer wird im eigentlich schon durch den typischen RS232 Anschluss transparent:
  • RX auf TX
  • TX auf RX
Allerdings erfolgt diese Brücke nicht mittels Hardware sondern Software, basierend auf einer einfachen Regel Empfängt die eine RS232 Schnittstelle etwas reiche die Daten an die andere Schnittstelle durch. Basierend auf der Tasmota Firmware, im Detail Tasmota Rules lautet die Rule wie folgt: Rule1 ON SerialReceived#Data DO SSerialSend1 %value% ENDON ON SSerialReceived#Data DO SerialSend1 %value% ENDON Nachfolgend die einfache Konfiguration des RS232 Sniffer Modus
  1. füge die Tasmota Rule1 ON SerialReceived#Data DO SSerialSend1 %value% ENDON ON SSerialReceived#Data DO SerialSend1 %value% ENDON in die Befehlszeile der Tasmota Konsole ein und drücke die Taste ENTER
  2. aktiviere die Rule durch Eingabe von Rule1 1 in die Kommandozeile und drücke erneut die ENTER Taste und schon ist der Sniffer Modus aktiv
  3. sendet man nun Daten, hier im Beispiel einen String an die zweite RS232 Schnittstelle - im Detail Hardware Serial Bridge GPIO4 und GPIO5 - werden die Daten im Tasmota RS232 Modul empfangen und gleichermassen an die erste RS232 Schnittstelle - UART Schnittstelle GPIO1 und GPIO3 - gesendet
  4. gleichermassen - sendet man ein Signal an die erste RS232 Schnittstelle werden die Daten  empfangen, und gleichermassen auf die Hardware Serial Bridge (GPIO4 und GPIO5) durchgereicht, im Detail über die zweite RS232 Schnittstelle ausgegeben.
Es gilt zu beachten für dieses Beispiel wurden 2 Stück CP2102 RS232 (nicht USB TTL Konverter) verwendet. Fügt man nun eine weitere Tasmota Rule hinzu, können sämtliche Daten beispielsweise über MQTT bereitgestellt werden.
RS232 Sniffer Configuration
Although the EI-OT dual RS232 module has 2 RS232 interfaces. Both interfaces normally work independently of each other. The basis for an RS232 sniffer is actually made clear by the typical RS232 connection:
  • RX to TX
  • TX to RX
However, this bridge is not done using hardware but rather software, based on a simple rule If one RS232 interface receives something, the data is passed on to the other interface. Based on the Tasmota firmware, in detail Tasmota Rules the rule is as follows: Rule1 ON SerialReceived#Data DO SSerialSend1 %value% ENDON ON SSerialReceived#Data DO SerialSend1 %value% ENDON Below is the simple configuration of the RS232 sniffer mode
  1. add the Tasmota Rule1 ON SerialReceived#Data DO SSerialSend1 %value% ENDON ON SSerialReceived#Data DO SerialSend1 %value% ENDON into the command line of the Tasmota console and press the ENTER key
  2. activate the rule by entering Rule1 1 in the command line and press the ENTER key again and the sniffer mode is active
  3. If you now send data, here in the example a string, to the second RS232 interface - in detail Hardware Serial Bridge GPIO4 and GPIO5 - the data is received in the Tasmota RS232 module and equally sent to the first RS232 interface - UART interface GPIO1 and GPIO3 -
  4. if you send a signal to the first RS232 interface, the data is received and passed on to the hardware serial bridge (GPIO4 and GPIO5), and output in detail via the second RS232 interface.
Please note that for this example, 2 CP2102 RS232 (not USB TTL converters) were used. If you now add another Tasmota rule, all data can be provided via MQTT, for example.
Tasmota Telemetrie Clients MQTT infrastructure
HiveMQ MQTT
Im folgenden Beispiel zur MQTT Anbindung eines Tasmota Moduls wird zwar HiveMQ als MQTT Broker verwendet, im Grunde ist die Einbindung innerhalb Tasmota stets identisch. Grundlegend basiert die Tasmota MQTT Anbindung auf den typischen Parametern
  • MQTT Broker Adresse / Url
  • MQTT Benutzername
  • MQTT Passwort
Ferner gibt es weitere Optionen, beispielsweise im Bezug HiveMQ wird nur das MQTT Protokoll über TLS unterstützt. Dementsprechend muß die Tasmota Firmware über MQTT TLS verfügen, im Detail bei der Kompilierung die Option #define USE_MQTT_TLS aktiviert sein. Oftmals wird ein MQTT Broker fälschlicherweise auch als ein "Server mit einem Webinterface" beschrieben. Ein MQTT Broker ist lediglich als Vermittler zwischen einer Vielzahl verschiedener Teilnehmer zu verstehen. Das ganz basiert dabei auf einer einfachen Grundlage es wird
  • abonniert
  • publiziert
stets basierend auf Topics / Themen. Übersetzt man nun die Topics auf Tasmota Module in Kombination mit typischer Infrastruktur, PC, Tablet, Mobiltelefon entspricht jedwede Hardware einem MQTT Client. Jeder MQTT Client meldet sich über die jeweilige URL / IP Adresse typischerweise über einen Benutzrnamen sowie Passwort beim MQTT Broker an. Nach erfolgreicher Authentifizierung wird em MQTT Broker mitgeteilt welche Topics man abonnieren, bzw. in welche Topics publiziert werden soll. Basierend auf diesen Grundlagen erfüllt der MQTT Server seine Funktion als Broker, Daten gezielt durchzureichen.
HiveMQ MQTT
In the following example of the Tasmota Module MQTT connection  HiveMQ is used as the MQTT broker, but the integration within Tasmota is basically always identical. The Tasmota MQTT connection is fundamentally based on the typical parameters
  • MQTT broker address/url
  • MQTT username
  • MQTT password
There are also other options, for example with HiveMQ only the MQTT protocol over TLS is supported. Accordingly, the Tasmota firmware must have MQTT TLS, in detail the option during compilation #define USE_MQTT_TLS be activated. An MQTT broker is often incorrectly described as a “server with a web interface”. An MQTT broker is simply to be understood as an intermediary between a large number of different participants. This is all based on a simple basis
  • subscribed
  • published
always based on topics. If you now translate the topics to Tasmota modules in combination with typical infrastructure, PC, tablet, mobile phone, ... any hardware corresponds as a MQTT client. Each MQTT client logs in to the MQTT broker via the respective URL / IP address, typically using a user name and password. After successful authentication, the MQTT broker is informed which topics subscribe to and/or which topics should be published in. Based on these basics, the MQTT server fulfills its function as a broker to pass data through in a targeted manner.
HiveMQ MQTT Broker Cluster setup
MQTT Broker einrichten
Die Einrichtung eines MQTT Brokers unter HiveMQ ist denkbar einfach. Zunächst, insofern man noch nicht über ein HiveMQ Benutzerkonto verfügt muss man sich hier entsprechend registrieren, bzw. anmelden. Nachdem man sich registriert und angemeldet hat wird man direkt auf die Cluster Verwaltung geleitet, hier lediglich den Button CREATE NEW CLUSTER klicken. Es erscheint die Übersicht der verfügbaren Cluster Pakete, hier das Paket Serverless FREE durch klick auf Get Started auswählen. Es erscheint das MQTT Cluster Management wichtig ist hier der Eintrag Cluster URL, das ist die zu verwendende Server URL / MQTT IP Adresse. Nun wird noch ein MQTT Benutzer sowie Passwort benötigt hierzu ganz oben im Menü von OVERVIEW auf ACCESS MANAGEMENT wechseln. Im Access Management nun einen Username sowie Password festlegen und im DropDown Permission Publish and Subscribe auswählen. Selbstredend sollte man sich Benutzername und Passwort zur weiteren Verwendung entsprechend kopieren / als Text ablegen. Die Benutzerdaten durch klicken auf CREATE CREDENTIAL bestätigen, in der Benutzerübersicht erscheint nun der oben festgelegte MQTT Benutzer. Das war auch schon alles, der MQTT Broker ist aktiv sodass entsprechende Clients angebunden werden können.
MQTT Broker Setup
Setting up an MQTT broker under HiveMQ is  easy. First of all, if you do not yet have a HiveMQ user account, you must register or log in here. After you have registered and logged in you will be taken directly to the cluster administration, just click the CREATE NEW CLUSTER button. The overview of the available cluster packages appears, select the Serverless FREE package by clicking on Get Started. The MQTT Cluster Management appears. The  Cluster URL entry appears, which is the server URL / MQTT IP address to be used. Now you need an MQTT user and password to switch from OVERVIEW to ACCESS MANAGEMENT at the top menu. Now set a username and password in Access Management and select Publish and Subscribe from the Permission drop-down. Of course, you should copy your username and password for further use / save them as text. Confirm the user data by clicking on CREATE CREDENTIAL; the MQTT user specified above will now appear in the user overview. That's all, the MQTT broker is active so that corresponding clients can be connected.
MQTT Explorer Setup HiveMQ MQTT Broker connection
MQTT Explorer
Wie im Vorfeld erwähnt dient der MQTT Broker lediglich als Vermittler zwischen MQTT Clients. Hier im Beispiel wird nun der MQTT Explorer als MQTT Client verwendet. Der MQTT Explorer ist für jedes gängige Desktop Betriebssystem verfügbar. Nach erfolgreicher Installation müssen lediglich die erforderlichen Parameter, basierend auf dem HiveMQ MQTT Broker eingepflegt wie folgt eingepflegt werden:
  1. klicke auf das Plus Zeichen neben Connections
  2. Lege einen Namen für die Verbindung unter Name fest beispielsweise HiveMQTest
  3. deaktiviere die Checkbox Validate certificate
  4. aktiviere die Checkbox Encryption (tls)
  5. wähle im Protocol DropDown mqtt://
  6. füge im Textfeld Host die Cluster URL vom HiveMQ MQTT Broker ein
  7. gebe im Textfeld Port 8883 ein
  8. gebe im Textfeld Username den zuvor im HiveMQ Cluster festgelegten Username ein
  9. gebe im Textfeld Password das zuvor im HiveMQ Cluster festgelegte Passwort ein
  10. klicke auf save um die gemachten Angaben zu speichern
  11. klicke auf connect
Der erste MQTT Client ist nun mit dem MQTT Broker verbunden. An dieser Stelle sei erwähnt beim MQTT Explorer ist der Name Programm, es werden sämtliche MQTT Client - Verbindungen sowie damit verbundene Topics angezeigt.
MQTT Explorer
As mentioned before, the MQTT broker only serves as an intermediary between MQTT clients. Here in the example the MQTT Explorer is now used as the first MQTT client. The MQTT Explorer is available here for every common desktop operating system. After successful installation, all you need to do is enter the required parameters based on the HiveMQ MQTT Broker as follows:
  1. click on the plus sign next to Connections
  2. Set a name for the connection under Name, for example HiveMQTest
  3. uncheck the Validate certificate checkbox
  4. activate the checkbox Encryption (tls)
  5. select mqtt:// in the Protocol DropDown
  6. In the Host text field, insert the cluster URL from the HiveMQ MQTT broker
  7. enter port 8883 in the Port text field
  8. In the Username text field, enter the username previously defined in the HiveMQ cluster
  9. In the Password text field, enter the password previously set in the HiveMQ cluster
  10. click on save to save the information provided
  11. click on connect
The first MQTT client is now connected to the MQTT broker. At this point it should be mentioned that the name of the MQTT Explorer says it all; all MQTT client connections and associated topics are displayed.
Tasmota HiveMQ MQTT Broker configuration Tasmota MQTT first start
Tasmota MQTT Konfiguration
Im Vorfeld sei erwähnt, die Tasmota Firmware muß MQTT TLS unterstützen, andernfalls erfolgt keine Anmeldung am HiveMQ MQTT Broker. Die Anbindung eines Tasmota Moduls an einen HiveMQ MQTT Broker erfolgt gleichermassen basierend auf den typischen MQTT Parametern unter Verwendung des Tasmota Webinterface:
  1. klicke auf das Configuration
  2. Klicke im Configuration Menu auf MQTT
  3. gebe in das Textfeld Host die Cluster URL vom HiveMQ MQTT Broker ein
  4. gebe im Textfeld Port (1883) 8883 ein
  5. aktiviere die Checkbox MQTT TLS. Ist diese Checkbox nicht vorhanden muss eine Tasmota Firmware mit MQTT TLS Unterstützung installiert werden, beispielsweise über die Tasmota Firmware Upgrade Funktion
  6. gebe im Textfeld User (DVES_USER) dan zuvor im HiveMQ Cluster festgelegten Username ein
  7. gebe im Textfeld Password das zuvor im HiveMQ Cluster festgelegte Passwort ein
  8. klicke auf save um die gemachten Angaben zu speichern
Das Tasmota Modul führt nun einen Neustart aus und verbindet sich mit dem HiveMQ MQTT Broker. Wechselt man in den MQTT Explorer sieht man bereits die Topic tele/tasmota_??????/LWT.
Tasmota MQTT configuration
It should be mentioned in advance that the Tasmota firmware must support MQTT TLS, otherwise there will be no connection established to the HiveMQ MQTT broker. The connection of a Tasmota module to a HiveMQ MQTT broker is based on the typical MQTT parameters by using the Tasmota web interface:
  1. click on  Configuration
  2. Click MQTT in the Configuration Menu
  3. enter the cluster URL of the HiveMQ MQTT Broker in the Host text field
  4. enter 8883 in the Port (1883) text box
  5. activate the checkbox MQTT TLS. If this checkbox is not present, Tasmota firmware with MQTT TLS support must be installed, for example via the Tasmota firmware upgrade function
  6. In the User (DVES_USER) text field, enter the user name previously specified in the HiveMQ cluster
  7. In the Password text field, enter the password previously set in the HiveMQ cluster
  8. click on save to save the information provided
The Tasmota module now restarts and connects to the HiveMQ MQTT broker. If you switch to the MQTT Explorer you can already see the topic tele/tasmota__??????/LWT
Tasmota send RS232 to MQTT Tasmota publish data to MQTT
Tasmota MQTT publish
Zwar verwendet man Tasmota häufig in Kombination mit Sensoren, hier im Beispiel wurde jedoch gezielt ein EI-OT RS232 WLan Bridge Modul verwendet. Typische Tasmota Sensor Module interagieren meist nur in eine Richtung, es werden Sensordaten publiziert. Der Ablauf ist denkbar einfach gemäß vorgegebenen Intervall erfasst das Tasmota Modul Sensordaten und publiziert diese Daten über die Topic tele und Benennung seiner Modul ID also Topic tele/tasmota_?????/sensors Übersetzt auf das Tasmota RS232 Modul erzeugen wir nun die Daten indem wir serielle Daten auf den DB9 Anschluss des RS232 Moduls senden (siehe im nebenstehenden Bild Terminal Texteingabe send a string from ....) Sobald die Taste ENTER im Terminal gedrückt wird (siehe unteres Bild), werden die Daten (der String)
  • über den HL340 USB TTL Konverter auf
  • die DB9 Buchse des Tasmota RS232 WLan Moduls ausgeben
  • über den 3232 Level Konverter
  • auf GPIO1 und GPIO3 des ESP-01+ gesendet
  • in der Tasmota Console ausgegeben
Betrachtet man sich nun den MQTT Explorer so erkennt man nun eine neue Topic tele/tasmota_?????/RESULT und sieht dort den String der zuvor über den den seriellen Terminal an das Rs232 Modul / Tasmota gesendet wurde. Der String wurde im Detail nachdem er empfangen wurde / in der Tasmota Console erschien
  • über WLan an den Router
  • an den HiveMQ MQTT Broker
durchgereicht, es wurde unter der Topic tele/tasmota_?????/RESULT publiziert.
Tasmota MQTT publish
Although Tasmota is often used in combination with sensors. In this example an EI-OT RS232 WiFi bridge module was specifically used. Typical Tasmota sensor modules usually only interact in one direction and sensor data is published. The process is very simple, according to the specified interval, the Tasmota module collects sensor data and publishes this data via the topic tele and naming its module ID, i.e. topic tele/tasmota_?????/sensors Translated to the Tasmota RS232 module, we now generate the data by sending serial data to the DB9 connection of the RS232 module (see terminal text input send a string from .... top image). As soon as the ENTER key is pressed in the terminal (see image below), the data (the string)
  • via the HL340 USB TTL converter
  • output the DB9 socket of the Tasmota RS232 WiFi module
  • via the 3232 level converter
  • sent to GPIO1 and GPIO3 of the ESP-01+
  • output in the Tasmota Console
If you take a look at the MQTT Explorer you will now see a new topic tele/tasmota_?????/RESULT including the string that was previously sent via the serial terminal to the RS232 module / Tasmota. The string was after it was received/appeared in the Tasmota Console
  • via WiFi to the router
  • passed through to the HiveMQ MQTT broker
it was published under the topic tele/tasmota_?????/RESULT.
MQTT send a string thru Tasmota to serial Terminal Serial Terminal receives RS232 Signal thru Tasmota over MQTT
Tasmota MQTT subscribe
Im Eigentlichen basiert das MQTT Prinzip nunmal auf Publizieren und Abonnieren. In Anlehnung an das obige Beispiel müsste nun zunächst das Tasmota Modul eine MQTT Topic abonnieren um etwas zu empfangen. Das Abonnieren einer Topic ist bereits mit der MQTT Konfiguration innerhalb der Tasmota Firmware erfolgt, bzw. im Detail handelt es sich um die Topic cmnd innerhalb von Tasmota. Im Detail werden sämtliche in diese Topic gesendeten Daten als Tasmota Commands abgearbeitet.  cmnd/tasmota_?????/ Wechselt man nun in den MQTT Explorer, scrollt im rechten Bereich nach unten bis der Reiter Publish erscheint kann man direkt in MQTT publizieren. Im Detail cmnd/tasmota_?????/ gefolgt vom Tasmota Command, in unserem Beispiel SerialSend1 um einen String
  • mittels Tasmota UART
  • auf den 3232 Konverter zu senden
  • das RS232 Signal auf den DB9 Anschluss
  • auf den HL340 USB TTL Konverter auszugeben
  • um im seriellen Terminal zu empfangen
Sobald der Button Publish im MQTT Explorer geklickt wird (siehe unteres Bild), werden die Daten (der String)
  • vom MQTT Explorer
  • über Netzwerk
  • an den HiveMQ MQTT Broker geschickt
  • auf Topic cmnd/tasmota_?????/ durchgereicht
  • vom Tasmota Modul empfangen
  • der Befehle SerialSend1 ausgeführt
  • der String über UART
  • auf den 3232 IC ausgegeben
  • zum DB9 Anschluss durchgereicht
  • vom HL340 USB TTL Konverter empfangen
  • im seriellen Terminal empfangen
Aus Sicht des MQTT Explorer wurde publiziert, aus Sicht des Tasmota Moduls wurde abonniert.
Tasmota MQTT subscribe
Actually, the MQTT principle is based on publishing and subscribing. Based on the example above, the Tasmota module would first have to subscribe to an MQTT topic in order to receive something. Subscribing to a topic has already been done with the MQTT configuration within the Tasmota firmware, or in detail it is the topic cmnd within Tasmota. In detail, all data sent to this topic is processed as Tasmota commands. cmnd/tasmota_?????/ If you now switch to the MQTT Explorer, scroll down in the right area until the Publish tab appears, you can publish directly in MQTT. In detail cmnd/tasmota_?????/ followed by the Tasmota Command, in our example SerialSend1 by a string
  • using Tasmota UART to send
  • to the 3232 converter
  • the RS232 signal to the DB9 connection
  • to the HL340 USB TTL converter
  • to receive in the serial terminal
As soon as the Publish button is clicked in the MQTT Explorer (see image below), the data (the string)
  • from MQTT Explorer
  • via network
  • sent to the HiveMQ MQTT broker
  • passed through to topic cmnd/tasmota_?????/
  • received from the Tasmota module
  • the SerialSend1 command is executed
  • the string via UART
  • output to the 3232 IC
  • passed through to the DB9 connector
  • received from the HL340 USB TTL converter
  • received in the serial terminal
From the MQTT Explorer perspective it was published, from the Tasmota module perspective it was subscribed.