Skip to content

Commit

Permalink
Add Debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Jan 24, 2025
1 parent 3d739c3 commit 9708066
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 26 deletions.
2 changes: 1 addition & 1 deletion components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ namespace esphome
if(cellData.index != 0) {
return cellData.left_nibble ? ((memory_buffer_[cellData.index] >> 4) & 0xF) : (memory_buffer_[cellData.index] & 0xF);
} else {
ESP_LOGV(TAG, "The setting %s is not available for model %s", setting_type_to_string(type), model_to_string(model_));
ESP_LOGD(TAG, "The setting %s is not available for model %s", setting_type_to_string(type), model_to_string(model_));
return 0;
}
}
Expand Down
47 changes: 35 additions & 12 deletions docs/de/guide/firmware/mqtt.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## MQTT Firmware
## MQTT

Bei Verwendung der MQTT-Firmware werden verschiedene Topics an deinen Broker gesendet. So funktioniert die Struktur der Topics und Steuerung.

Expand All @@ -9,37 +9,60 @@ Jede Entität veröffentlicht ihren Status auf einem Topic im folgenden Format:
```

Du kannst bestimmte Entitäten steuern, indem du einen Befehl an ein Topic mit folgendem Format sendest:
::: code-group
``` [Topic]
<TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command
```
Topic: <TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command
Payload: ON oder OFF oder was immer unterstützt wird
``` [Payload]
ON oder OFF oder was sonst unterstützt wird
```
:::

### Beispiel
Um die [Ring-To-Open](../automation/ring-to-open.md) Automatisierung zu aktivieren oder zu deaktivieren, sende ON oder OFF als Payload an dieses Topic:
::: code-group
``` [Topic]
doorman-s3/switch/ring_to_open/command
```
Topic: doorman-s3/switch/ring_to_open/command
Payload: ON
``` [Payload]
ON
```
:::

### Spezielle Topics
Es gibt spezielle Topics, die erweiterte Befehle ermöglichen.

#### Senden eines hexadezimalen Commands
Um einen hexadezimalen Befehl an den Bus zu senden, verwende das Topic `doorman-s3/send_raw_command` mit einer JSON-Payload. Beispiel:
```json
#### Senden eines Commands (Hexadezimal)
Hier ist ein Beispiel um hexadezimale Commands (uint32) an den Bus zu senden:
::: code-group
``` [Topic]
doorman-s3/send_raw_command
```
```json [Payload]
{
"command": 0x1C30BA80
}
```
```json [Advanced Payload]
{
"command": 0x1C30BA80,
"is_long": false
}
```
:::

#### Senden eines Commands mit Command Builder
Um einen Befehl mittels Command Builder an den Bus zu senden, verwende das Topic `doorman-s3/send_command` mit einer JSON-Payload. Beispiel:
```json
#### Senden eines Commands (Command Builder)
Hier ist ein Beispiel um Commands via Command Builder an den Bus zu senden:
::: code-group
``` [Topic]
doorman-s3/send_command
```
```json [Payload]
{
"type": "open_door",
"address": 0,
"payload": 0,
"serial_number": 123456
}
```
```
:::
49 changes: 36 additions & 13 deletions docs/en/guide/firmware/mqtt.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## MQTT Firmware
## MQTT

When using the MQTT firmware, various topics are published to your broker. Here's how the topic structure and controls work.

Expand All @@ -9,37 +9,60 @@ Each entity publishes its state to a topic in the following format:
```

You can control certain entities by publishing a command to this topic format:
::: code-group
``` [Topic]
<TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command
```
Topic: <TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command
Payload: ON or OFF or whatever is supported
``` [Payload]
ON or OFF or whatever is supported
```
:::

### Example
To enable or disable the [Ring-To-Open](../automation/ring-to-open.md) automation, send `ON` or `OFF` as the payload to the topic:
To enable or disable the [Ring-To-Open](../automation/ring-to-open.md) automation, send `ON` or `OFF` as the payload to the topic:
::: code-group
``` [Topic]
doorman-s3/switch/ring_to_open/command
```
Topic: doorman-s3/switch/ring_to_open/command
Payload: ON
``` [Payload]
ON
```
:::

### Special Topics
Certain special topics allow for advanced commands.

#### Send a hexadecimal Command
To send a hexadecimal command to the bus, use the topic `doorman-s3/send_raw_command ` with a JSON payload. Here's an example payload:
```json
#### Send a Command (Hexadecimal)
Here's an example of how to send a hexadecimal command (uint32) to the bus:
::: code-group
``` [Topic]
doorman-s3/send_raw_command
```
```json [Payload]
{
"command": 0x1C30BA80
}
```
```json [Advanced Payload]
{
"command": 0x1C30BA80,
"is_long": false
}
```
:::

#### Send a parsed Command
To send a command via command builder to the bus, use the topic `doorman-s3/send_command` with a JSON payload. Here's an example payload:
```json
#### Send a Command (Command Builder)
Here's an example of how to use the command builder to send a command to the bus:
::: code-group
``` [Topic]
doorman-s3/send_command
```
```json [Payload]
{
"type": "open_door",
"address": 0,
"payload": 0,
"serial_number": 123456
}
```
```
:::

0 comments on commit 9708066

Please sign in to comment.