Skip to content

Commit

Permalink
Add TTC model type
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Feb 22, 2025
1 parent b72ddb2 commit 2e8adf4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions components/tc_bus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"TCS ISH3230 / Koch TCH50 GFA",
"TCS ISH3030 / Koch TCH50 / Scantron Lux2",
"TCS ISH1030 / Koch TTS25",
"TCS TTC-XX",
"TCS IMM1000 / Koch TCH30",
"TCS IMM1100 / Koch TCHE30",
"TCS IMM1300 / Koch VTCH30",
Expand Down
7 changes: 7 additions & 0 deletions components/tc_bus/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ namespace esphome
if (str == "TCS ISH3230 / Koch TCH50 GFA") return MODEL_ISH3230;
if (str == "TCS ISH3030 / Koch TCH50 / Scantron Lux2") return MODEL_ISH3030;
if (str == "TCS ISH1030 / Koch TTS25") return MODEL_ISH1030;
if (str == "TCS TTC-XX") return MODEL_TTCXX;
if (str == "TCS IMM1000 / Koch TCH30") return MODEL_IMM1000;
if (str == "TCS IMM1100 / Koch TCHE30") return MODEL_IMM1100;
if (str == "TCS IMM1300 / Koch VTCH30") return MODEL_IMM1300;
Expand Down Expand Up @@ -758,6 +759,7 @@ namespace esphome
case MODEL_ISH3230: return "TCS ISH3230 / Koch TCH50 GFA";
case MODEL_ISH3030: return "TCS ISH3030 / Koch TCH50 / Scantron Lux2";
case MODEL_ISH1030: return "TCS ISH1030 / Koch TTS25";
case MODEL_TTCXX: return "TCS TTC-XX";
case MODEL_IMM1000: return "TCS IMM1000 / Koch TCH30";
case MODEL_IMM1100: return "TCS IMM1100 / Koch TCHE30";
case MODEL_IMM1300: return "TCS IMM1300 / Koch VTCH30";
Expand Down Expand Up @@ -984,6 +986,10 @@ namespace esphome
modelData.category = 0;
modelData.memory_size = 16;
break;
case MODEL_TTCXX:
modelData.category = 0;
modelData.memory_size = 16;
break;
case MODEL_IMM1000: /* TCH30 */
modelData.category = 0;
modelData.memory_size = 32;
Expand Down Expand Up @@ -1089,6 +1095,7 @@ namespace esphome
break;

case MODEL_ISH1030:
case MODEL_TTCXX:
case MODEL_IVH3222:
switch (setting) {
case SETTING_RINGTONE_ENTRANCE_DOOR_CALL:
Expand Down
1 change: 1 addition & 0 deletions components/tc_bus/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace esphome
MODEL_ISH3230,
MODEL_ISH3030,
MODEL_ISH1030,
MODEL_TTCXX,
MODEL_IMM1000,
MODEL_IMM1100,
MODEL_IMM1300,
Expand Down
12 changes: 7 additions & 5 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ namespace esphome
if (cmd_data.command == 0x08000040)
{
// TTC-XX
device.model = MODEL_ISH1030;
device.model = MODEL_TTCXX;
}
else if (cmd_data.command == 0x08000048)
{
Expand Down Expand Up @@ -894,7 +894,7 @@ namespace esphome
send_command(COMMAND_TYPE_REQUEST_VERSION, 0, 0, serial_number, 400);

this->set_timeout("wait_for_identification_category_0", 1000, [this, serial_number]()
{
{
// Didn't receive identify result of category 0
// Second try with category 1
ESP_LOGD(TAG, "Identifying device model (Category %i) using serial number: %i...", 1, serial_number);
Expand All @@ -907,7 +907,8 @@ namespace esphome
this->identify_model_ = false;
this->identify_timeout_callback_.call();
ESP_LOGE(TAG, "Identification response not received in time. The device model may not support identification.");
}); });
});
});
}

void TCBusComponent::read_memory(uint32_t serial_number, Model model)
Expand Down Expand Up @@ -951,15 +952,16 @@ namespace esphome
reading_memory_max_ = (model_data.memory_size / 4);

this->set_timeout("wait_for_memory_reading", reading_memory_max_ * 600, [this]()
{
{
memory_buffer_.clear();
reading_memory_ = false;
reading_memory_serial_number_ = 0;
reading_memory_count_ = 0;
reading_memory_max_ = 0;

this->read_memory_timeout_callback_.call();
ESP_LOGE(TAG, "Memory block not received in time. Reading canceled!"); });
ESP_LOGE(TAG, "Memory block not received in time. Reading canceled!");
});

read_memory_block();
}
Expand Down
3 changes: 2 additions & 1 deletion docs/en/reference/esphome-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ Below are the available settings for specific indoor station models:

| Model | Available settings |
|------------------------------|------------------------------------------------------------------------------------------------------------|
| TCS ISH1030 / Koch TTS25 | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call` |
| TCS ISH1030 / Koch TTS25 | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call` |
| TCS TTC-XX | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call` |
| TCS ISH3030 / Koch TCH50 / Scantron Lux2 | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call`, `volume_ringtone`, `volume_handset_door_call` |
| TCS ISH3130 / Koch TCH50P / Scantron LuxPlus | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call`, `volume_ringtone`, `volume_handset_door_call` |
| TCS ISH3230 / Koch TCH50 GFA | `ringtone_floor_call`, `ringtone_entrance_door_call`, `ringtone_internal_call`, `volume_ringtone`, `volume_handset_door_call` |
Expand Down

0 comments on commit 2e8adf4

Please sign in to comment.