|
ESPHome 2026.6.0-dev
|
This file implements the UART protocol spoken over the on-board Micro-USB (Type B) connector of Tormatic and Novoferm gates manufactured as of 2016. More...
Data Structures | |
| struct | CommandRequestReply |
| struct | MessageHeader |
| struct | StatusReply |
| struct | StatusRequest |
| class | Tormatic |
Enumerations | |
| enum | MessageType : uint16_t { STATUS = 0x0104 , COMMAND = 0x0106 } |
| enum | StatusType : uint16_t { GATE = 0x0A , UNKNOWN = 0x0B } |
| enum | GateStatus : uint8_t { PAUSED , CLOSED , VENTILATING , OPENED , OPENING , CLOSING } |
Functions | |
| const char * | message_type_to_str (MessageType t) |
| struct esphome::tormatic::MessageHeader | __attribute__ ((packed)) |
| CoverOperation | gate_status_to_cover_operation (GateStatus s) |
| const char * | gate_status_to_str (GateStatus s) |
| template<typename T > | |
| std::vector< uint8_t > | serialize (T obj) |
Variables | |
| enum esphome::tormatic::StatusType | __attribute__ |
This file implements the UART protocol spoken over the on-board Micro-USB (Type B) connector of Tormatic and Novoferm gates manufactured as of 2016.
All communication is initiated by the component. The unit doesn't send data without being asked first.
There are two main message types: status requests and commands.
Querying the gate's status:
| sequence | length | type | payload | | 0xF3 0xCB | 0x00 0x00 0x00 0x06 | 0x01 0x04 | 0x00 0x0A 0x00 0x01 | | 0xF3 0xCB | 0x00 0x00 0x00 0x05 | 0x01 0x04 | 0x02 0x03 0x00 |
This request asks for the gate status (0x0A); the only other value observed in the request was 0x0B, but replies were always zero. Presumably this queries another sensor on the unit like a safety breaker, but this is not relevant for an esphome cover component.
The second byte of the reply is set to 0x03 when the gate is in fully open position. Other valid values for the second byte are: (0x0) Paused, (0x1) Closed, (0x2) Ventilating, (0x3) Opened, (0x4) Opening, (0x5) Closing. The meaning of the other bytes is currently unknown and ignored by the component.
Controlling the gate:
| sequence | length | type | payload | | 0x40 0xFF | 0x00 0x00 0x00 0x06 | 0x01 0x06 | 0x00 0x0A 0x00 0x03 | | 0x40 0xFF | 0x00 0x00 0x00 0x06 | 0x01 0x06 | 0x00 0x0A 0x00 0x03 |
The unit acks any commands by echoing back the message in full. However, this does not mean the gate has started closing. The component only considers status replies as authoritative and simply fires off commands, ignoring the echoed messages.
The payload structure is as follows: [0x00, 0x0A] (gate), followed by one of the states normally carried in status replies: (0x0) Pause, (0x1) Close, (0x2) Ventilate (open ~20%), (0x3) Open/high-torque reverse. The protocol implementation in this file simply reuses the GateStatus enum for this purpose.
| enum esphome::tormatic::GateStatus : uint8_t |
| Enumerator | |
|---|---|
| PAUSED | |
| CLOSED | |
| VENTILATING | |
| OPENED | |
| OPENING | |
| CLOSING | |
Definition at line 116 of file tormatic_protocol.h.
| enum esphome::tormatic::MessageType : uint16_t |
| Enumerator | |
|---|---|
| STATUS | |
| COMMAND | |
Definition at line 54 of file tormatic_protocol.h.
| enum esphome::tormatic::StatusType : uint16_t |
| Enumerator | |
|---|---|
| GATE | |
| UNKNOWN | |
Definition at line 109 of file tormatic_protocol.h.
| struct esphome::tormatic::MessageHeader esphome::tormatic::__attribute__ | ( | (packed) | ) |
|
inline |
Definition at line 125 of file tormatic_protocol.h.
|
inline |
Definition at line 141 of file tormatic_protocol.h.
|
inline |
Definition at line 60 of file tormatic_protocol.h.
| std::vector< uint8_t > esphome::tormatic::serialize | ( | T | obj | ) |
Definition at line 192 of file tormatic_protocol.h.
| struct esphome::tormatic::CommandRequestReply esphome::tormatic::__attribute__ |